Question: a) What is run time analysis used for? 1. Storing information 2. Estimating how long it takes algorithms to run 3. Analyzing errors in a

a) What is run time analysis used for? 1. Storing information 2. Estimating how long it takes algorithms to run 3. Analyzing errors in a program 4. Creating data structurs b) Sorting involves 1. Measuring execution times of programmed data structures 2. Expressing the running time as a function of the input size N of each algorithm 3. Arranging objects in ascending order by some numerical property 4. Looking for the largest and smallest elements in a list 2 c) The worst case time complexity of inserting an int value in a specific index of an int array has the following complexity: 1. O(1) 2. O(nlogn) 3. O( logn) 4. O(n) a) Program efficiency is best calculated by counting number of lines of code(true/false) b) There are algorithms that are cheaper, hence faster than O(n) when searching through a sorted list (true/false) c) Arrays are dynamically expanding data structures (true/false) d) Array lists are dynamically expanding data structures (true/false)
Step by Step Solution
There are 3 Steps involved in it
a What is run time analysis used for Estimating how long it take... View full answer
Get step-by-step solutions from verified subject matter experts
