Rubrik interview question

binary seqrch based and sliding window based