Refactor 'merge k sorted lists', 'subsets', 'word search'.