This file contains hidden or 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
function findNumber(minN, maxN, findMe, opNum = 0) { | |
// O(log n) | |
// if inital maxN is ... then there will be ... operations | |
// 100 ~6 ops | |
// 1,000 ~9 ops | |
// 10,000 ~13 ops | |
// 100,000 ~16 ops | |
// 100,000,000 ~26 ops | |
// 100,000,000,000 ~36 ops | |
// 100,000,000,000,000 ~46 ops |
This file contains hidden or 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
""" | |
Quick Sort algo in Python3 | |
""" | |
def quick_sort(arr): | |
""" | |
quick_sort sorts an array of integers. | |
""" | |
if len(arr) <= 1: | |
return arr |
OlderNewer