Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For the improvement of efficiency of quick sort the pivot can be Select one: O a. The first element O b. The mean element O

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

For the improvement of efficiency of quick sort the pivot can be Select one: O a. The first element O b. The mean element O c. The last element O d. None of the above Straight selection sort is basically a method of repeated Select one: 0 a. interchange O b. searching O c. Position adjustment O d. None of the above To analyze the sequential algorithm for the average-case efficiency all of the following are correct except one. Select one: O a. We must make some assumptions about possible input of size n. O b. The probability of a successful search is p (0 spsi). O c. Possibility of the first match in the ith position of the list is the same for every O d. The best case do not exceed n/2 when the element is not exist. The queue after each operation of the following sequence that starts with the empty queue: enqueue (8), enqueue (7), dequeu, enqueue (3), enqueue (9), dequeue, enqueue (5), enqueue (2), dequeue Select one: O a. 5 9 2 O b. 2 5 9 O c.9 52 O d. 9 25 The solution of the following Recurrence relation: ao = 8; an = nan-1 is: Select one: a. an = 8n(n-1)! O b. an= 5n! O c. an = 8n! d. an= 5n(n-1)(n-2) By using which method sorting is not possible Select one: O a. Insertion O b. Selection O c. Deletion O d. Exchange In the following linear search alg. that returns the index location of a value in an array. The average number of lines executed /*a is the array of size n we are searching through */ i = 0; while ((i 1 Select one: O a. T(n) = 2n+2, O(n) O b. T(n) = 2n, O(2n) O c. T(n) = 2n, O(n) d. T(n) = n, on) Giving the following list 42 6718 95 using merge sort the third step of merging will produce the following list: Select one: O a. 2,4,6,7,1,8,5,9 O b. 1,2,4,5,6,7,8,9 O c. there is no merging step O d. 2,4,6,7,1,5,8,9 In quick sort, the number of partitions into which the file of size n is divided by a selected record is Select one: O a. 4 O b. n/2(n-1) O c.2 0 d. 2(n-1) T(n), is the running time of a particular algorithm on input of size n, In the following algorithm T(n) is: 1. n = read input from user 2. sum = = 0 3. i= 0 4. while i<><>

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

Modern Datalog Engines In Databases

Authors: Bas Ketsman ,Paraschos Koutris

1st Edition

1638280428, 978-1638280422

Students also viewed these Databases questions