Analyze Runtime of Nested Binary Search Function