Solution to Merge K sorted lists