The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)
There are two sorted arrays a and a of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).