Skip to content
Advertisement

Tag: priority-queue

Java – Use PriorityQueue sort list but have empty list

This is my solution for leetcode 759. Employee Free Time, but it has index out of boundary issue that i don’t understand. I got “index 0 out of bounds for length 0” exception. The test case i used is ‘[[[1,2]],[[1,3]],[[4,10]]]’ and this is the output: I only have 3 lists and based on the output, it looks like it has

Advertisement