Merge Sorted Array and Longest Common Prefix.