Skip to content

[Feat] To Add Bitonic Sort Algorithm #280

@NithinU2802

Description

@NithinU2802

Hi, I’d like to add the Bitonic Sort algorithm in sorting_algorithm. It’s a parallel sorting algorithm that recursively builds and merges bitonic sequences, useful for understanding parallel computation concepts.

1. Consider
v = [3, 7, 4, 8, 6, 2, 1, 5]

2. Divide & Create Bitonic Sequence
Here, the algorithm spliting by different halves into multiple pairs and It recursively performs “compare-and-swap” operations to make smaller bitonic sequences and merge them.

                 [3,7,4,8,6,2,1,5]
                    /         \
             Ascend            Descend
           [3,4,7,8]          [6,5,2,1]
             /   \              /   \
         [3,7] [4,8]       [6,2] [5,1]

3. Parallel Execution View

  • Compare 4 pairs → in parallel
  • Compare 2 pairs → in parallel
  • Compare 1 pair → in parallel

4. Final Merge Result
v = [1,2,3,4,5,6,7,8]

I’d be happy to get assigned and raise a PR🚀.

Metadata

Metadata

Assignees

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