Skip to content

Instantly share code, notes, and snippets.

@anaclumos
Last active July 31, 2022 19:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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;
@LeftoverChineseFood
Copy link

this code sucks did you write this? (proceeds to ask the rest of the room 1 by one "who wrote this")

@aLucaz
Copy link

aLucaz commented May 11, 2021

😢

@LeftoverChineseFood
Copy link

"Who wrote this?"

"Did you write this?"
"Did you write this?"
"Did you write this?"

@sharpblade4
Copy link

you got an extra parenthesis at the end of L2

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