Grokking the Coding Interview: Patterns for Coding Questions
Ask Author
Back to course home

0% completed

Vote For New Content
A little shorter, perhaps more confusing: if ascending == (arr[mid] < key): ...

Pete Stenger

Aug 28, 2022

A little shorter, perhaps more confusing:

if ascending == (arr[mid] < key): start = mid+1 else: end = mid-1

0

0

Comments
Comments

On this page