Python 3 Question 1 1 point How is new data accommodated whe
Python 3
Question 1 (1 point) How is new data accommodated when inserted into a dynamic array that is at capacity? O A new single node is allocated and connected to the previous end A new, larger array is dynamically allocated, and all data is copied over o More space just off the end of the existing array is allocated/claimed O Data cannot be added when at capacity Save Question 2 (1 point) How is new data accommodated when inserted into a linked list that is at capacity? O A new single node is allocated and connected to the previous end A new, larger array is dynamically allocated, and all data is copied over o More space just off the end of the existing array is allocated/claimed O Data cannot be added when at capacitySolution
question 1: until reserved space is available elements are added in to array, once reserved space is finished then it is a burdensome process because space is allocated by creating a new array and coping whole thing into it
question 2:hope so a new singe node is added to previous allocation
question 3 :one instance of a class in general represents an OBJECT
wuestion 4: the action that an object perform are \"MEMBER FUNCTIONS\" more precisely speaking methods in class
question 5:it is order of logn i.e O(log(n)) because we no need to sort here again
question 6:dynamic array would be a good option
question 7:it is O(nlogn)
question 8:worst case complexity of insertion sort is O(n)
question 9:he best one is
def factorial(n):
if(n==1):
return 1
else
return n*factorial(n-1)
hope so this may help you to get an intiation....al the best
