Zentree Labs interview question

A Two pointer (binary search) based DSA question and time complexity.