I recently attended an interview where I was asked \"write a program to find 100 largest numbers out of an array of 1 billion numbers.\"
I was only able to give a br
i did my own code,not sure if its what the "interviewer" it's looking
private static final int MAX=100; PriorityQueue queue = new PriorityQueue<>(MAX); queue.add(array[0]); for (int i=1;i=MAX) { queue.poll(); } queue.add(array[i]); } }