Skip to content

Add Solidity implementation for Bubble Sort Algorithm #91

Description

@Akshat0125

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 🌱

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions