Data Structures, Algorithms, Java, Big O Notation, Searching And Sorting.
ArrayList[n]; // Create empty buckets for (int i = 0; i < n; i++) bucket[i] = new ArrayList<Float>(); // Add elements into the buckets for (int i = 0; i < n; i++) { int bucketIndex = (int) arr[i] * n; bucket[bucketIndex].add(arr[i]); } // Sort the elements of each bucket for (int i = 0; i < n; i++)