CSE 15 Lecture Notes - Lecture 19: Priority Queue, Binary Tree, Binary Search Algorithm
Document Summary
Broad strokes: focus on data structs, arrays, linked lists, stacks, queues, binary search trees, queues, stacks, binary search trees, sorting algorithms, and how they work, time complexity (o(n), linked list, look at the examples on piazza. O(n: o(n) = you will visit elements that amount of times, length: time the length of the runtime vs how fast. Heapsort takes things off of heap: priority queue, take stuff off priority queue. Max-heap: sorted in array (start with index 1, ex: [10][9][5][7][4][4][2] Binary tree search: sample tree: find 9. Yes, go right, then ask if 9 = 9. 1, 5, 5, 6, 8, 9, 10: pre, post, clump sets, greedy algorithms are not going to be on the test. Bitevectors: bitshift = shift all bits over by 1, 01100101 << 2 = 10010100, 01100101 >> 2 = 00011001, 11001100 >> 2 = 11110011, 11001100 << 2 = 00110000, right shifts in 2"s complement are strange.