O(log N) instead of O(N) chord search