Skip to content

Instantly share code, notes, and snippets.

@anaclumos
Last active October 25, 2024 09:02
Show Gist options
  • Save anaclumos/8cb9c9caff35672038418afc3ec19a5e to your computer and use it in GitHub Desktop.
Save anaclumos/8cb9c9caff35672038418afc3ec19a5e to your computer and use it in GitHub Desktop.
Silicon Valley S06 E04 Richard Hendricks Sorted List Brute Force Search Code
(R. Hendricks 112) int index = 0;
(R. Hendricks 113) while (!element.equals(sortedList.get(index))
(R. Hendricks 114) && sortedList.size() > ++index);
(R. Hendricks 115) return index < sortedList.size() ? index : -1;
@PreciousNyasulu
Copy link

😂😂😂😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment