This is a problem I can't currently find on Leetcode or StackOverflow. Lets say you have a set of lists of numbers or references as so:
[[1,2,3],[3,4,5],[6,7,8],[8,9],[10],[7]]
What is the fastest algorithm to merge these lists such that the output would be:
[[1,2,3,4,5],[6,7,8,9],[10]]
Many thanks.