Optimal Merge Pattern Time Complexity