Question
2. Which data structure would you choose to help track a collection of objects where only the object with the largest value needs to be
2. Which data structure would you choose to help track a collection of objects where only the object with the largest value needs to be readily accessible?
(a) a list (b) a stack (c) a queue (d) a hashtable (e) a heap
3. Which data structure would you choose to help track a collection of objects where only the object that has been tracked the longest needs to be readily accessible?
(a) a list (b) a stack (c) a queue (d) a hashtable (e) a heap
4. What is the run-time complexity of locating and retrieving the element in the middle (by index) of a circular, doubly-linked list with a sentinel head?
(a) O(1) (b) O(log N) (c) O(N) (d) O(N log N) (e) O(N2 )
5. What is the run-time complexity of determining whether a specified key exists in a hashtable containing N key/value pairs?
(a) O(1) (b) O(log N) (c) O(N) (d) O(N log N) (e) O(N2 )
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started