 The maximum key value can be computed in linear time by looking up all the keys once.The floor function must be used to convert a floating number to an integer.The function "nextSort" is a sorting function used to sort each bucket.