CS 202 fall 2017, quiz 4. cs202 login: _________________________ Name: ______________________ Each question is 1 point and is graded as right, wrong, or half credit. The total will be divided so the quiz is worth 3 HW/quiz points. For the following sequence of operations, write what each data structure would look like at the end. insert 25, insert 2, insert 10, insert 30, delete 10, insert 7, insert 27, insert 20, delete 25, insert 42 Stack (insert is push, delete is pop and ignores its argument) Queue (insert is enqueue, delete is dequeue and ignores its argument) Binary search tree (not auto-balancing) Unsorted array Hash table (hash table of size 8 with hash function h(x) = x % 8) Sorted array For each of the following data structures, write a "big O" expression for the best-case and worst-case running time for the insert operation when there are already n items in the data structure already. ** include cost of lookup if insert needs to do lookup ** if best and worst are the same, just give that Stack (push) Queue (enqueue) Binary search tree (not auto-balancing) Unsorted array Hash table (assume hash function takes O(1) time) Sorted array