Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thealgorithms/solidity
Algorithms and data structures implemented in Solidity
https://github.com/thealgorithms/solidity
algorithms data-structures data-structures-and-algorithms datastructures dev-protocol dsa education hacktoberfest solidity
Last synced: about 6 hours ago
JSON representation
Algorithms and data structures implemented in Solidity
- Host: GitHub
- URL: https://github.com/thealgorithms/solidity
- Owner: TheAlgorithms
- License: lgpl-2.1
- Created: 2021-11-09T08:45:45.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-27T09:17:30.000Z (about 1 year ago)
- Last Synced: 2024-10-29T21:05:59.488Z (about 2 months ago)
- Topics: algorithms, data-structures, data-structures-and-algorithms, datastructures, dev-protocol, dsa, education, hacktoberfest, solidity
- Language: Solidity
- Homepage:
- Size: 6.22 MB
- Stars: 329
- Watchers: 12
- Forks: 95
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
The Algorithms - Solidity
All algorithms implemented in Solidity - for education
(still a work-in-progress project)
This is going to be used for our partnership with [Dev Protocol](https://devprotocol.xyz). 🚀
Implementations are for learning purposes only. As they may be less secure than in real-world context, use them at your discretion.
## Setting up `foundry`
Guide to installing `foundry` - \
Clone the current project and enter the directory.```bash
git clone https://github.com/TheAlgorithms/Solidity.git
cd Solidity
```Installing `forge-std` (Forge Standard Library).
```bash
forge install foundry-rs/forge-std
```Build the project using `forge-std`.
```bash
forge build
```Run `forge-std` automatic tests.
```bash
# forge test --match-contract Test
forge test --match-contract AbsTest
```## Lists of Algorithms
- [Algorithms](./src)
- [Maths](./src/Maths)
- [Abs](./src/Maths/Abs.sol)
- [AddArray](./src/Maths/AddArray.sol)
- [AliquotSum](./src/Maths/AliquotSum.sol)
- [Area](./src/Maths/Area.sol)
- [Armstrong Number](./src/Maths/armstrongNumber.sol)
- [Array Reversal](./src/Maths/ReverseArray.sol)
- [Average Mean](./src/Maths/AverageMean.sol)
- [BinaryExponentiation](./src/Maths/BinaryExponentiation.sol)
- [Divide Digit](./src/Maths/divideDigit.sol)
- [Exponentiation](./src/Maths/exponentiation.sol)
- [Factorial](./src/Maths/factorial.sol)
- [Fibonacci](./src/Maths/fibonacci.sol)
- [Lucas Series](./src/Maths/lucasSeries.sol)
- [Modulo](./src/Maths/modulo.sol)
- [Multiply Array](./src/Maths/MulArray.sol)
- [Multiply Digit](./src/Maths/multiplyDigit.sol)
- [Percentage](./src/Maths/Percentage.sol)
- [Perfect Square](./src/Maths/perfectSquare.sol)
- [Sub Digit](./src/Maths/subDigit.sol)
- [Sum Digit](./src/Maths/subDigit.sol)
- [String Matching](./src/Maths/stringMatch.sol)
- [Volume](./src/Maths/volume.sol)
- [Zellers Congruence Algorithm](./src/Maths/zellersCongruenceAlgorithm.sol)
- [Dynamic Programming](./src/DynamicProgramming)
- [Knapsack](./src/DynamicProgramming/Knapsack.sol)
- [Searches](./src/Searches)
- [Binary Search](./src/Searches/BinarySearch.sol)
- [Linear Search](./src/Searches/LinearSearch.sol)
- [Sorts](./src/Sorts)
- [Bubble Sort](./src/Sorts/BubbleSort.sol)
- [Merge Sort](./src/Sorts/MergeSort.sol)
- [Quick Sort](./src/Sorts/QuickSort.sol)
- [Selection Sort](./src/Sorts/SelectionSort.sol)## Community Channels
We'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!