mirror of
https://github.com/danbulant/introductionToProgramming
synced 2026-05-19 20:38:36 +00:00
11 lines
No EOL
218 B
Java
11 lines
No EOL
218 B
Java
package week6;
|
|
|
|
public class Histogram {
|
|
public static int[] histogram(int[] a, int max) {
|
|
int[] output = new int[max];
|
|
for(var x = 0; x < a.length; x++) {
|
|
output[a[x]]++;
|
|
}
|
|
return output;
|
|
}
|
|
} |