Question: Algorithms i). How many comparisons does Insertion Sort do when sorting the array 4, 8, 6, 9, 2? ii). How many comparisions does Merge do

Algorithms

i). How many comparisons does Insertion Sort do when sorting the array 4, 8, 6, 9, 2?

ii). How many comparisions does Merge do to merge arrays 1, 2, 8, 9, 10 and 3, 4, 5, 6, 7?

iii). Which is the largest value of n for which you can solve within one second a probelm that requires T(n) operations, where each of these operations is carried out in 10^-9 seconds, with these functions T(n)?

1). log2(n)

2). n

3). n log2 n

4). n^2

5). 2^n

6). n!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!