מיון

מיון דליים

מחלק איברים לדליים, ממיין כל דלי ואז משרשר את התוצאות.

שלב 1 מתוך 36

מתחיל מיון דליים עם 3 דליים. חלק את האיברים, מיין כל דלי במיון הכנסה, ואז שרשר.

0
השוואות
0
מהלכים
אלגוריתם
BucketSort(arr, k):
create k empty buckets
for each element x in arr:
place x in bucket[floor(k*(x-min)/range)]
for each bucket b:
insertion sort bucket b
concatenate all buckets into arr
// sorted

Legend

מוצב
נכתב בחזרה
ממוין
לא ממוין

The auxiliary section shows 3 buckets side-by-side. Elements are distributed by value range, sorted within each bucket using insertion sort, then concatenated.

702192431485366758Auxiliary array
1 / 36מהירות