Pyramid Consulting Interview Question

Something related to Binary Seach or Two Pointer