Solidity
Solidity copied to clipboard
Add Solidity implementation for Bubble Sort Algorithm
Description
I’d like to add a Solidity implementation for the Bubble Sort Algorithm to this repository.
The algorithm will sort an array of unsigned integers in ascending order.
Why
This algorithm is fundamental for beginners learning Solidity’s array operations, loops, and gas optimization.
It will also help new learners understand how on-chain sorting can be implemented efficiently.
Implementation Details
- Create a new file:
Sorting/BubbleSort.sol - Implement a function
bubbleSort(uint[] memory arr) public pure returns (uint[] memory) - Add test cases to verify sorting correctness.
Type
- [ ] New Algorithm
- [ ] Solidity Implementation
Additional context
This issue is created for Hacktoberfest 2025 contribution.
I’d like to work on this issue 🌱
I’d like to take this issue as part of Hacktoberfest. Please assign it to me.