access kth element in constant time. This is a divide and conquer algorithm that can find a solution in O(n) time. small = [e for e in lst if e < pivot] big = [e for e in lst if e > pivot] # if we get ...
access kth element in constant time. This is a divide and conquer algorithm that can find a solution in O(n) time. # pick a pivot and separate into list based on pivot.