Student Name __________ Answer True or False to the following problems. Insertin
ID: 3810237 • Letter: S
Question
Student Name __________ Answer True or False to the following problems. Inserting an item into an unsorted list and inserting into a sorted list are the same time complexity. __________ In array-based implementation, deleting from a sorted list requires that the elements below the one being deleted be moved up one slot. ____________ You can perform a binary search on both a linked-based implementation and an array-based implementation. ___________ The next item in a linked list always can be found by accessing the next physical location in memory. ___________ lf currPtr points to a node in a dynamic linked list, the operation currPtr++ advances to the next node in the list.________ A class template allows the compiler to generate multiple versions of a class type by using type parameters.______________ Briefly answer the following questions. (1) What is the difference between a shallow copy and a deep copy? (2) When a copy constructor (a special member function) of a class is implicitly called? Please use Big-O notations such as O(N) to indicate the time-complexity of each following operation. Note the length of the list is N (A) Retrieve Item in an Unsorted List: ___________ (B) Retrieve Item in a Sorted List using binary search: ___________ (C) Insert Item in an Unsorted List: ___________ (D) Insert Item a Sorted List: __________Explanation / Answer
1) no complexity of inserting an item to the unsorted list is less as compared to inserting an item to sorted list
2) yes since the element in the arraylist is sorted so the elements has to be moved up by one, so that they have correct order
3) yes we can perform the binary search on the linkedlist but it will take more time as comapred to the bnary search on array
4) no
5) no it will give error
6) yes
as per chegg policy we are requied to answer first 4 parts of the ques, please raise a seperate ques for other remaining parts