study_2
This is an old revision of the document!
Binary Heaps
enqueue or dequeue items in O(logn)
Priority Queues use a min heap or max heap
Reverse Singly Linked List
prev = None cur = head while cur: next_node = cur.nect cur.next = prev prev = cur cur = next_node head = prev
Reverse Double Linked List
Power Sets
Tries
N Choose K
n!/((n-k)!k!)
Knapsack
Coins
Quick Sort
Heaps
Spiral
Quick Sort
study_2.1592240708.txt.gz · Last modified: 2020/06/15 17:05 by jrseti