
##
# Bucket sorting of the array. Implicit assumption that all
# elements are less than 100
##
def bucketSort(array):
  buckets = [[],[],[],[],[],[],[],[],[],[]]
  for element in array:
    bucketNumber = int(element / 10)
    buckets[bucketNumber].append(element)
  returnArray = []
  for bucket in buckets:
    bucket.sort()
    returnArray.extend(bucket)
  return returnArray


print(bucketSort([2,1,62,34,26,53,26,57,3]))

8406c2656e297a5c1ce84259db25e2ee9517b73d
<mask token>

def bucketSort(array):
    buckets = [[], [], [], [], [], [], [], [], [], []]
    for element in array:
        bucketNumber = int(element / 10)
        buckets[bucketNumber].append(element)
    returnArray = []
    for bucket in buckets:
        bucket.sort()
        returnArray.extend(bucket)
    return returnArray


<mask token>

def bucketSort(array):
    buckets = [[], [], [], [], [], [], [], [], [], []]
    for element in array:
        bucketNumber = int(element / 10)
        buckets[bucketNumber].append(element)
    returnArray = []
    for bucket in buckets:
        bucket.sort()
        returnArray.extend(bucket)
    return returnArray


print(bucketSort([2, 1, 62, 34, 26, 53, 26, 57, 3]))


##
# Bucket sorting of the array. Implicit assumption that all
# elements are less than 100
##
def bucketSort(array):
  buckets = [[],[],[],[],[],[],[],[],[],[]]
  for element in array:
    bucketNumber = int(element / 10)
    buckets[bucketNumber].append(element)
  returnArray = []
  for bucket in buckets:
    bucket.sort()
    returnArray.extend(bucket)
  return returnArray


print(bucketSort([2,1,62,34,26,53,26,57,3]))
