Created
December 24, 2016 00:35
-
-
Save nhuntwalker/bc56d7be87a466388325f5ec186d1e8f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Write a function that takes two arguments: | |
- a list of numbers (not necessarily sorted) | |
- a number | |
Return the lowest index that the given number can take within the input list, | |
if that list was sorted. | |
e.g. the_list = [1, 2, 3, 4, 5], the_number = 2.5 | |
the lowest index it can take is 2 | |
e.g. the_list = [3, 1, 4, 2, 5], the_number = 2.5 | |
the lowest index it can take is 2 | |
email: nicholas@codefellows.com | |
Whiteboard Prompt: | |
Create a Stack that has a "get_min" method that always returns the minimum value | |
in the Stack in O(1) time |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment