FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

GitHub Viewer

package misc; import java.util.Arrays; /** * Bucket Sort is also known as bin sort. * It works by distributing the element into the array also called buckets. * */ public class BucketSort { public static int[] bucketSort(int[] arr) { int i, j; int[] bucket = new int[arr.length + 1]; Arrays.fill(bucket, 0); for(i = 0; i < arr.length; i++) { bucket[arr[i]]++; } int k = 0; for(i = 0; i

Back | FazBrowse Home | New Git URL