How do you find if a linked list has a loop in it? Given K sorted integer arrays filled on average with N elements, how do you find a minimal span of numbers that contain at least one number from each array (inclusive of the boundaries).
Sigiloso
2nd question is use a min heap and find the range between the max and min of the first elements from each list. Then drop the minimum number and append the next largest number out of all the lists to the subset that you're considering.