Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a) Given a set of 200 unsorted data (i.e. N = 200). What would be the runtime if Bubble sort is used to sort them?

a) Given a set of 200 unsorted data (i.e. N = 200). What would be the runtime if Bubble sort is used to sort them?

b) What is the basic difference between an Iterative function and a Recursive function?

c) Given runtimes of two algorithms as below:

T1(N) = N2lgN and T2(N) =

Which algorithm will have shorter runtime, 1 or 2, give justifications.

d) Give examples of at least three algorithms based on Divide and Conquer principles.

e) Given the following data set:

12, 23, 29, 31, 41, 56, 71, 81, 91, 191

Which algorithm out of Insertion sort, quick sort and Merge sort will having shortest runtime and what will be that runtime?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M. Ricardo, Susan D. Urban, Karen C. Davis

4th Edition

1284231585, 978-1284231588

More Books

Students also viewed these Databases questions

Question

Explain Coulomb's law with an example

Answered: 1 week ago

Question

What is operating system?

Answered: 1 week ago

Question

What is Ohm's law and also tell about Snell's law?

Answered: 1 week ago