Below is a question that I need assistance with.
Posted: Fri Jul 08, 2022 6:35 am
Below is a question that I need assistancewith.
Section 1: (20 points) (a - 10, b-10) (a) List the big-O of the following commands for question 1-12. Circle true or false for 13-20 1. Stack-push() 2. Stack-isEmpty()) 3. Queue - offer()) 4. Queue - remove() 5. Linked List - loop over elements with iterator 6. Linked List - loop over elements with get() 7. ArrayList - reallocate()/expand() 8. Recursive - fibonacci worst case 9. Linked List - add at front 10. Linked List - add at end no tail 11. Linked List - remove at head 12. Creating a Java Object. 13. ArrayList - add in front - O(1) 14. ArrayList - remove at end - O(n) 15. ArrayList - remove in front - O(n) 16. Binary Search - sorted array - O(n log n) 17. Search - non sorted array - O(n^2) 18. Deque - add in front (no growth) - O(n) 19. Deque - add at tail (no growth) - 0(1) 20. Binary Search Tree - search - O(log n) True False True False True False True False True False True False True False True False
Section 1: (20 points) (a - 10, b-10) (a) List the big-O of the following commands for question 1-12. Circle true or false for 13-20 1. Stack-push() 2. Stack-isEmpty()) 3. Queue - offer()) 4. Queue - remove() 5. Linked List - loop over elements with iterator 6. Linked List - loop over elements with get() 7. ArrayList - reallocate()/expand() 8. Recursive - fibonacci worst case 9. Linked List - add at front 10. Linked List - add at end no tail 11. Linked List - remove at head 12. Creating a Java Object. 13. ArrayList - add in front - O(1) 14. ArrayList - remove at end - O(n) 15. ArrayList - remove in front - O(n) 16. Binary Search - sorted array - O(n log n) 17. Search - non sorted array - O(n^2) 18. Deque - add in front (no growth) - O(n) 19. Deque - add at tail (no growth) - 0(1) 20. Binary Search Tree - search - O(log n) True False True False True False True False True False True False True False True False