Hey folks, I’m struggling with the comparator logic alongs the likes of:
PriorityQueue<Node> minHeap = new PriorityQueue<Node>( (n1, n2) -> lists.get(n1.arrayIndex)[n1.elementIndex] - lists.get(n2.arrayIndex)[n2.elementIndex]);
Has anyone any good resources for learning on this? How can I learn the likes of these key words arrayIndex and elementIndex. As this is becoming a real sticking point for moving forward with these kinds of questions.
Cheers