{"id":19871088,"url":"https://github.com/thealgorithms/solidity","last_synced_at":"2025-04-05T07:08:09.942Z","repository":{"id":37010177,"uuid":"426153531","full_name":"TheAlgorithms/Solidity","owner":"TheAlgorithms","description":"Algorithms and data structures implemented in Solidity","archived":false,"fork":false,"pushed_at":"2023-10-27T09:17:30.000Z","size":6522,"stargazers_count":329,"open_issues_count":12,"forks_count":95,"subscribers_count":12,"default_branch":"main","last_synced_at":"2024-10-29T21:05:59.488Z","etag":null,"topics":["algorithms","data-structures","data-structures-and-algorithms","datastructures","dev-protocol","dsa","education","hacktoberfest","solidity"],"latest_commit_sha":null,"homepage":"","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheAlgorithms.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":"TheAlgorithms","issuehunt":null,"otechie":null,"custom":null}},"created_at":"2021-11-09T08:45:45.000Z","updated_at":"2024-10-14T14:13:32.000Z","dependencies_parsed_at":"2023-01-17T12:57:24.843Z","dependency_job_id":"d970204c-c317-49e8-a65d-04b902f60b16","html_url":"https://github.com/TheAlgorithms/Solidity","commit_stats":{"total_commits":111,"total_committers":25,"mean_commits":4.44,"dds":0.7387387387387387,"last_synced_commit":"08cba51fb38e276062b0c9791d7e0ee494ffa903"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheAlgorithms%2FSolidity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheAlgorithms%2FSolidity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheAlgorithms%2FSolidity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheAlgorithms%2FSolidity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheAlgorithms","download_url":"https://codeload.github.com/TheAlgorithms/Solidity/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299833,"owners_count":20916190,"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","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":["algorithms","data-structures","data-structures-and-algorithms","datastructures","dev-protocol","dsa","education","hacktoberfest","solidity"],"created_at":"2024-11-12T16:11:13.394Z","updated_at":"2025-04-05T07:08:09.917Z","avatar_url":"https://github.com/TheAlgorithms.png","language":"Solidity","readme":"\u003cdiv align=\"center\"\u003e\n\u003c!-- Title: --\u003e\n  \u003ca href=\"https://github.com/TheAlgorithms/\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/TheAlgorithms/website/1cd824df116b27029f17c2d1b42d81731f28a920/public/logo.svg\" height=\"100\"\u003e\n  \u003c/a\u003e\n  \u003ch1\u003e\u003ca href=\"https://github.com/TheAlgorithms/\"\u003eThe Algorithms\u003c/a\u003e - Solidity\u003c/h1\u003e\n\u003c!-- Labels: --\u003e\n  \u003c!-- First row: --\u003e\n  \u003ca href=\"https://gitpod.io/#https://github.com/TheAlgorithms/Solidity\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod\u0026style=flat-square\" height=\"20\" alt=\"Gitpod Ready-to-Code\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/TheAlgorithms/Solidity/blob/master/CONTRIBUTING.md\"\u003e\n    \u003cimg src=\"https://img.shields.io/static/v1.svg?label=Contributions\u0026message=Welcome\u0026color=0059b3\u0026style=flat-square\" height=\"20\" alt=\"Contributions Welcome\"\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/github/repo-size/TheAlgorithms/Solidity.svg?label=Repo%20size\u0026style=flat-square\" height=\"20\"\u003e\n  \u003ca href=\"https://discord.gg/c7MnfGFGa6\"\u003e\n    \u003cimg src=\"https://img.shields.io/discord/808045925556682782.svg?logo=discord\u0026colorB=7289DA\u0026style=flat-square\" height=\"20\" alt=\"Discord chat\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://gitter.im/TheAlgorithms\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Chat-Gitter-ff69b4.svg?label=Chat\u0026logo=gitter\u0026style=flat-square\" height=\"20\" alt=\"Gitter chat\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://liberapay.com/TheAlgorithms/donate\"\u003e\n    \u003cimg src=\"https://liberapay.com/assets/widgets/donate.svg\" alt=\"Donate on Liberapay\"\u003e\n  \u003c/a\u003e\n\u003c!-- Short description: --\u003e\n  \u003ch3\u003eAll algorithms implemented in Solidity - for education\u003c/h3\u003e\n  \u003ch5\u003e(still a work-in-progress project)\u003c/h5\u003e\n\n\u003c/div\u003e\n\nThis is going to be used for our partnership with [Dev Protocol](https://devprotocol.xyz). 🚀\n\nImplementations are for learning purposes only. As they may be less secure than in real-world context, use them at your discretion.\n\n## Setting up `foundry`\n\nGuide to installing `foundry` - \u003chttps://book.getfoundry.sh/getting-started/installation\u003e\\\nClone the current project and enter the directory.\n\n```bash\n  git clone https://github.com/TheAlgorithms/Solidity.git\n  cd Solidity\n```\n\nInstalling `forge-std` (Forge Standard Library).\n\n```bash\n  forge install foundry-rs/forge-std \n```\n\nBuild the project using `forge-std`.\n\n```bash \n  forge build\n```\n\nRun `forge-std` automatic tests.\n\n```bash \n  # forge test --match-contract \u003ccontract-name\u003eTest\n  forge test --match-contract AbsTest\n```\n\n## Lists of Algorithms\n\n- [Algorithms](./src)\n  - [Maths](./src/Maths)\n    - [Abs](./src/Maths/Abs.sol)\n    - [AddArray](./src/Maths/AddArray.sol)\n    - [AliquotSum](./src/Maths/AliquotSum.sol)\n    - [Area](./src/Maths/Area.sol)\n    - [Armstrong Number](./src/Maths/armstrongNumber.sol)\n    - [Array Reversal](./src/Maths/ReverseArray.sol)\n    - [Average Mean](./src/Maths/AverageMean.sol)\n    - [BinaryExponentiation](./src/Maths/BinaryExponentiation.sol)\n    - [Divide Digit](./src/Maths/divideDigit.sol)\n    - [Exponentiation](./src/Maths/exponentiation.sol)\n    - [Factorial](./src/Maths/factorial.sol)\n    - [Fibonacci](./src/Maths/fibonacci.sol)\n    - [Lucas Series](./src/Maths/lucasSeries.sol)\n    - [Modulo](./src/Maths/modulo.sol)\n    - [Multiply Array](./src/Maths/MulArray.sol)\n    - [Multiply Digit](./src/Maths/multiplyDigit.sol)\n    - [Percentage](./src/Maths/Percentage.sol)\n    - [Perfect Square](./src/Maths/perfectSquare.sol)\n    - [Sub Digit](./src/Maths/subDigit.sol)\n    - [Sum Digit](./src/Maths/subDigit.sol)\n    - [String Matching](./src/Maths/stringMatch.sol)\n    - [Volume](./src/Maths/volume.sol)\n    - [Zellers Congruence Algorithm](./src/Maths/zellersCongruenceAlgorithm.sol)\n  - [Dynamic Programming](./src/DynamicProgramming)\n    - [Knapsack](./src/DynamicProgramming/Knapsack.sol)\n  - [Searches](./src/Searches)\n    - [Binary Search](./src/Searches/BinarySearch.sol)\n    - [Linear Search](./src/Searches/LinearSearch.sol)\n  - [Sorts](./src/Sorts)\n    - [Bubble Sort](./src/Sorts/BubbleSort.sol)\n    - [Merge Sort](./src/Sorts/MergeSort.sol)\n    - [Quick Sort](./src/Sorts/QuickSort.sol)\n    - [Selection Sort](./src/Sorts/SelectionSort.sol)\n\n## Community Channels\n\nWe're on [Discord](https://discord.gg/c7MnfGFGa6) and [Gitter](https://gitter.im/TheAlgorithms)! Community channels are great for you to ask questions and get help. Please join us!\n","funding_links":["https://liberapay.com/TheAlgorithms","https://liberapay.com/TheAlgorithms/donate"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthealgorithms%2Fsolidity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthealgorithms%2Fsolidity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthealgorithms%2Fsolidity/lists"}