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;
@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

@PreciousNyasulu
Copy link

๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚

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