{"id":31913952,"url":"https://github.com/sir-gon/algorithm-exercises-rust","last_synced_at":"2025-10-13T18:57:24.303Z","repository":{"id":313147357,"uuid":"1050217743","full_name":"sir-gon/algorithm-exercises-rust","owner":"sir-gon","description":"Algorithms Exercises solved in Rust. Developed with TDD.","archived":false,"fork":false,"pushed_at":"2025-09-29T15:01:22.000Z","size":86,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-29T17:10:55.603Z","etag":null,"topics":["algorithm-challenges","algorithms","clippy","hackerrank","projecteuler","rust","tdd","test-driven-development","test-driven-development-with-rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sir-gon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["sir-gon"],"buy_me_a_coffee":"gonzalodiaz"}},"created_at":"2025-09-04T05:51:47.000Z","updated_at":"2025-09-29T15:01:21.000Z","dependencies_parsed_at":"2025-09-04T07:28:17.243Z","dependency_job_id":"79259fa7-5e33-481c-9796-8328b2f6c90d","html_url":"https://github.com/sir-gon/algorithm-exercises-rust","commit_stats":null,"previous_names":["sir-gon/algorithm-exercises-rust"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sir-gon/algorithm-exercises-rust","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sir-gon%2Falgorithm-exercises-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sir-gon%2Falgorithm-exercises-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sir-gon%2Falgorithm-exercises-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sir-gon%2Falgorithm-exercises-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sir-gon","download_url":"https://codeload.github.com/sir-gon/algorithm-exercises-rust/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sir-gon%2Falgorithm-exercises-rust/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279016628,"owners_count":26085853,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithm-challenges","algorithms","clippy","hackerrank","projecteuler","rust","tdd","test-driven-development","test-driven-development-with-rust"],"created_at":"2025-10-13T18:57:21.819Z","updated_at":"2025-10-13T18:57:24.295Z","avatar_url":"https://github.com/sir-gon.png","language":"Rust","funding_links":["https://github.com/sponsors/sir-gon","https://buymeacoffee.com/gonzalodiaz"],"categories":[],"sub_categories":[],"readme":"# Algorithm Exercises (Rust 🦀)\n\n[![Rust on Linux CI Test](https://github.com/sir-gon/algorithm-exercises-rust/actions/workflows/rust.yml/badge.svg)](https://github.com/sir-gon/algorithm-exercises-rust/actions/workflows/rust.yml)\n[![Markdown Lint](https://github.com/sir-gon/algorithm-exercises-rust/actions/workflows/markdown-lint.yml/badge.svg)](https://github.com/sir-gon/algorithm-exercises-rust/actions/workflows/markdown-lint.yml)\n[![YAML lint](https://github.com/sir-gon/algorithm-exercises-rust/actions/workflows/yamllint.yml/badge.svg)](https://github.com/sir-gon/algorithm-exercises-rust/actions/workflows/yamllint.yml)\n\n![GitHub](https://img.shields.io/github/license/sir-gon/algorithm-exercises-rust)\n![GitHub language count](https://img.shields.io/github/languages/count/sir-gon/algorithm-exercises-rust)\n![GitHub top language](https://img.shields.io/github/languages/top/sir-gon/algorithm-exercises-rust)\n[![codecov](https://codecov.io/gh/sir-gon/algorithm-exercises-rust/branch/main/graph/badge.svg?token=YZ41BE67E4)](https://codecov.io/gh/sir-gon/algorithm-exercises-rust)\n\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=sir-gon_algorithm-exercises-rust\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=sir-gon_algorithm-exercises-rust)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=sir-gon_algorithm-exercises-rust\u0026metric=coverage)](https://sonarcloud.io/summary/new_code?id=sir-gon_algorithm-exercises-rust)\n[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=sir-gon_algorithm-exercises-rust\u0026metric=bugs)](https://sonarcloud.io/summary/new_code?id=sir-gon_algorithm-exercises-rust)\n[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=sir-gon_algorithm-exercises-rust\u0026metric=code_smells)](https://sonarcloud.io/summary/new_code?id=sir-gon_algorithm-exercises-rust)\n[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=sir-gon_algorithm-exercises-rust\u0026metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=sir-gon_algorithm-exercises-rust)\n\n## TL;DR\n\nAlgorithms Exercises solved in [Rust](https://www.rust-lang.org/)\nDeveloped with TDD.\n\n[![Rust](    https://img.shields.io/badge/Rust-000000?style=for-the-badge\u0026logo=rust\u0026logoColor=white)](https://gcc.gnu.org/onlinedocs/gcc/Standards.html#C-Language)\n[![Docker](https://img.shields.io/badge/docker-%230db7ed.svg?style=for-the-badge\u0026logo=docker\u0026logoColor=white)](https://www.docker.com/)\n\nGo to [Install and run](#install-and-run)\n\n## What is this?\n\nThis repository is part of a series that share and solve the same [objectives](#objetives),\nwith the difference that each one is based on a different software ecosystem,\ndepending on the chosen programming language:\n\n- [Modern Javascript: algorithm-exercises-js](https://github.com/sir-gon/algorithm-exercises-js)\n- [Typescript: algorithm-exercises-ts](https://github.com/sir-gon/algorithm-exercises-ts)\n\n- [Python 3.x: algorithm-exercises-py](https://github.com/sir-gon/algorithm-exercises-py)\n- [Go / Golang: algorithm-exercises-go](https://github.com/sir-gon/algorithm-exercises-go)\n\n- [Java: algorithm-exercises-java](https://github.com/sir-gon/algorithm-exercises-java)\n- [.NET / C#: algorithm-exercises-rustsharp](https://github.com/sir-gon/algorithm-exercises-rustsharp)\n- [C++17: algorithm-exercises-rustpp](https://github.com/sir-gon/algorithm-exercises-rustsharp-cpp)\n\n## Objetives\n\n### Functional\n\n- For academic purposes, it is an backup of some algorithm exercises\n(with their solutions), proposed by various sources:\n[leetcode, hackerrank, projecteuler](#algorithm-excersices-sources), ...\n\n- The solutions must be written on \"vanilla code\", that is,\navoiding as much as possible the use of external libraries (in runtime).\n\n- Adoption of methodology and good practices.\nEach exercise is implemented as a unit test set,\nusing TDD (Test-driven Development) and Clean Code ideas.\n\n### Technical\n\nFoundation of a project that supports:\n\n- Explicit **typing** when the language supports it, even when it is not mandatory.\n- Static Code Analysis (**Lint**) of code, scripts and documentation.\n- Uniform **Code Styling**.\n- **Unit Test** framework.\n- **Coverge** collection. High coverage percentage. Equal or close to 100%.\n- **Pipeline** (Github Actions). Each command must take care of its\nreturn status code.\n- **Docker**-based workflow to replicate behavior in any environment.\n- Other tools to support the reinforcement of software development **good practices**.\n\n## Install and Run\n\n- (⭐️) [Install and run directly with make](#install-and-run-directly-with-make)\nrequire Rust tools installed in your SO.\n\u003c!--\n- [Install and in Docker](#install-and-running-with-docker-) require Docker and\ndocker compose installed.\n- [Install and in Docker with make](#install-and-running-with-docker--using-make)\nrequire Docker, docker compose and GNU make installed. --\u003e\n\n\u003c!-- ⭐️: Prefered way. --\u003e\n\n### Install and run directly with make\n\nIt is assumed that the following tools have already been installed:\n\n- [**Install Rust**](https://www.rust-lang.org/tools/install)\n\nUsing Rust tools in your SO. You must install dependencies:\n\n```bash\nmake dependencies\nmake lint # optional\nmake build\nmake test\n```\n\u003c!--\n#### Test run with alternative behaviors\n\nNot implemented yet\n\n#### Examples running tests with alternative behaviors\n\n### Install and Running with Docker 🐳\n\nBuild an image of the test stage.\nThen creates and ephemeral container an run tests.\n\n```bash\ndocker compose build algorithm-exercises-rust\ndocker compose build algorithm-exercises-rust-lint\ndocker compose build algorithm-exercises-rust-test\ndocker compose build algorithm-exercises-rust-dev\n```\n\n```bash\ndocker compose --profile testing run --rm algorithm-exercises-rust-test\n```\n\n### Install and Running with Docker 🐳 using make\n\n```bash\nmake compose/build\nmake compose/lint # optional\nmake compose/test\n``` --\u003e\n\n## About development\n\n```sh\nrustc --version\n```\n\n```text\nrustc 1.89.0 (29483883e 2025-08-04)\n```\n\n---\n\n```sh\ncargo --version\n```\n\n```text\ncargo 1.89.0 (c24e10642 2025-06-23)\n```\n\n---\n\n```sh\nrustup --version\n```\n\n```text\nrustup 1.28.2 (e4f3ad6f8 2025-04-28)\ninfo: This is the version for the rustup toolchain manager, not the rustc compiler.\ninfo: The currently active `rustc` version is `rustc 1.89.0 (29483883e 2025-08-04)`\n```\n\n## Algorithm excersices sources\n\n- [Leetcode](https://leetcode.com/) online platform for\ncoding interview preparation.\n- [HackerRank](https://www.hackerrank.com/) competitive programming challenges\nfor both consumers and businesses.\n- [Project Euler](https://projecteuler.net/) a series of computational problems\nintended to be solved with computer programs.\n\nUse these answers to learn some tip and tricks for algorithms tests.\n\n### Disclaimer. Why I publish solutions?\n\nAs Project Euler says:\n\n\u003chttps://projecteuler.net/about#publish\u003e\n\n```text\nI learned so much solving problem XXX, so is it okay to publish my solution elsewhere?\nIt appears that you have answered your own question. There is  thing quite like that \"Aha!\" moment when you finally beat a problem which you have been working on for some time. It is often through the best of intentions in wishing to share our insights so that others can enjoy that moment too. Sadly, that will rarely be the case for your readers. Real learning is an active process and seeing how it is done is a long way from experiencing that epiphany of discovery. Please do not deny others what you have so richly valued yourself.\n\nHowever, the rule about sharing solutions outside of Project Euler does not apply to the first one-hundred problems, as long as any discussion clearly aims to instruct methods, not just provide answers, and does not directly threaten to undermine the enjoyment of solving later problems. Problems 1 to 100 provide a wealth of helpful introductory teaching material and if you are able to respect our requirements, then we give permission for those problems and their solutions to be discussed elsewhere.\n```\n\nIf you have better answers or optimal solutions, fork and PR-me\n\nEnjoy 😁 !\n\n## Status\n\n### License\n\n[LICENSE.md](LICENSE.md)\n\n### Coverage\n\n[![Coverage](https://codecov.io/gh/sir-gon/algorithm-exercises-rust/graphs/tree.svg?token=Q3B4ZT87O5)](https://codecov.io/gh/sir-gon/algorithm-exercises-rust)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsir-gon%2Falgorithm-exercises-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsir-gon%2Falgorithm-exercises-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsir-gon%2Falgorithm-exercises-rust/lists"}