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
A product manager and a developer are discussing a feature. The product manager mentions it should just be a couple lines of code to implement, evincing a simplistic understanding of the problem. |
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
Here is a lesson in creative writing. | |
First rule: Do not use semicolons. They are transvestite hermaphrodites representing absolutely nothing. All they do is show you've been to college. | |
- Kurt Vonnegut, A Man without a Country |
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
def insertion_sort(array) | |
n = 1 | |
while n < array.length | |
key = array[n] | |
i = n - 1 | |
while i >= 0 and array[i] > key | |
array[i + 1] = array[i] | |
i = i - 1 | |
end | |
array[i + 1] = key |