AlgorandSIMULATION v1.0
Sequential Engines(17)
Parallel Engines
Bucket Sort
sequentialRAMA non-comparative partition-based sort that distributes array elements into a number of buckets, sorts each bucket individually (e.g. using Insertion Sort), and then concatenates the sorted buckets.
SIMULATION STEP PROGRESSStep 1 / 1
SPEED (50%)
SIZE (8)
💡 Tip: Enter integers between 1 and 99. Max size is 15.
Code Workspace
1procedure bucketSort(A: list, bucketCount)
2 buckets := list of empty buckets
3 for i := 0 to length(A) - 1 do
4 idx := calculateBucketIndex(A[i])
5 insert A[i] into buckets[idx]
6 end for
7 for i := 0 to bucketCount - 1 do
8 sort(buckets[i])
9 end for
10 concatenate buckets into A
11end procedure
Currently highlights executing branch
RUNTIME COST METRICS
Comparisons0
Memory Writes0
Memory Reads0
Elements Swapped0
Computational Model:RAM (Single Core)
Theoretical Bound:O(N + k) avg
Space Complexity:O(N + k)
Communication Cost:0 (Shared Bus)
THEORETICAL ANALYSIS & RESEARCH
Conceptual Focus: A non-comparative partition-based sort that distributes array elements into a number of buckets, sorts each bucket individually (e.g. using Insertion Sort), and then concatenates the sorted buckets.
Real-world Industrial Applications:
- Sorting uniformly distributed floating-point numbers
- Sorting large databases spread across distributed nodes
- Pre-sorting phase in distributed computing environments