Algorithm Atlas / GreedyGreedyExplainedOptimal Merge PatternAlways merge the two smallest files. TimeO(n log n) Extra spaceO(n) Use it forMinimising merge cost.An animated walkthrough for this algorithm isn’t built yet. The summary above explains the idea; see the related animated algorithms below to practise the same technique.More in GreedyFractional KnapsackAnimatedActivity SelectionAnimatedJob Sequencing with DeadlinesAnimatedHuffman CodingAnimatedMinimum PlatformsAnimatedGas Station ProblemAnimated