-
-
Notifications
You must be signed in to change notification settings - Fork 342
Closed
Description
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