Answered step by step
Verified Expert Solution
Question
1 Approved Answer
question 18 thru 20 Answer the following questions with either: A. Constant amount of time regardless of size of n B. The time depends on
question 18 thru 20
Answer the following questions with either: A. Constant amount of time regardless of size of n B. The time depends on size of n but twice as large will generally be less than twice the time. C. The time depends on size of n and twice as large will likely require about twice the time. 14. How long will it take to insert an element at the head of a linked list of size n? 15. How long will it take to determine if an integer exists in a sorted array of n integers? 16. How long will it take to remove an element from a linked list of size n if you only have a pointer to the element you wish to remove and a pointer to the head of the list (assume that copying the data element of the linked list is not practical)? 17. How long will it take to remove an element from a doubly linked list of size n if you only have a pointer to the element you wish to remove and a pointer to the head and tail of the list? 18. How long will it take to insert an element at the beginning of a sorted array of integers of size n (the other items must remain in the same order)? 19. How long will it take to delete element k (where k is close to 1/2 n) from an array of integers of size n where the order of the items in the array does not matter? 20. How long will it take to delete element k (where k is close to 1/2 n) from an array of integers of size n where the order of the other items in the array does matter and must stay the same? a 21. How long will it take to determine if an element exists in a sorted linked list of size n? 22. How long will it take to correctly delete an element into an AVL tree of size nStep 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