post: interview question, search in shifted array