I'm trying to make a priority queue that orders integer arrays by the value of the first element, but I am running into an issue that the complier is complaining that an array is requred in my Comporator lambda expression. Any idea on what I'm screwing up?
PriorityQueue<int[]> kNearest = new PriorityQueue((a, b) -> b[0] > a[0]);
Line 22: error: array required, but Object found
PriorityQueue<int[]> kNearest = new PriorityQueue((a, b) -> b[0] > a[0]);
^
Line 22: error: array required, but Object found
PriorityQueue<int[]> kNearest = new PriorityQueue((a, b) -> b[0] > a[0]);