American Express interview question

1 from sliding window and other from rotated array.