Given a sorted array that is rotated n times find an element