Given two sorted list of size 'm' and 'n' respectively. The number of comparison needed in the worst case by the merge sort algorithm will be (A) m x n (B) max (m, n) (C) min (m, n) (D) m + n – 1

1 Answer

Answer :

 (D) m + n – 1

Related questions

Description : If the given input array is sorted or nearly sorted, which of the following algorithm gives the best performance? a) Insertion sort b) Selection sort c) Quick sort d) Merge sort

Last Answer : a) Insertion sort

Description : Which of the following sorting algorithm has the running time that is least dependant on the initial ordering of the input? a) Insertion sort b) Quick sort c) Merge sort d) Selection sort

Last Answer : d) Selection sort

Description : Which of the following is not an in-place sorting algorithm? a) Selection sort b) Heap sort c) Quick sort d) Merge sort

Last Answer : merge sort

Description : Which of the following is a stable sorting algorithm? a) Merge sort b) Typical in-place quick sort c) Heap sort d) Selection sort

Last Answer : a) Merge sort

Description : Which of the following is not a stable sorting algorithm? a) Insertion sort b) Selection sort c) Bubble sort d) Merge sort

Last Answer : b) Selection sort

Description : You have to sort a list L, consisting of a sorted list followed by a few ‘random’ elements. Which of the following sorting method would be most suitable for such a task ? (A) Bubble sort (B) Selection sort (C) Quick sort (D) Insertion sort

Last Answer : (D) Insertion sort

Description : Let f(n) and g(n) be asymptotically non-negative functions. Which of the following is correct? (A) θ(f(n) * g(n)) = min(f(n), g(n)) (B) θ(f(n) * g(n)) = max(f(n), g(n)) (C) θ(f(n) + g(n)) = min(f(n), g(n)) (D) θ(f(n) + g(n)) = max(f(n), g(n))

Last Answer : (D) θ(f(n) + g(n)) = max(f(n), g(n))

Description : Let R and S be two fuzzy relations defined as: Then, the resulting relation, T, which relates elements of universe x to elements of universe z using max-min composition is given by

Last Answer : Answer: C

Description : Which of the following algorithm pays the least attention to the ordering of the elements in the input list? a) Insertion sort b) Selection sort c) Quick sort d) None

Last Answer : b) Selection sort

Description : Which of the following is not the internal sort? A) Insertion Sort B) Bubble Sort C) Merge Sort D) Heap Sort

Last Answer : C) Merge Sort

Description : Merge sort uses a) Divide-and-conquer b) Backtracking c) Heuristic approach d) Greedy approach

Last Answer : a) Divide-and-conquer

Description : ................ is used in game trees to reduce the number of branches of the search tree to be traversed without affecting the solution. (A) Best first search (B) Goal stack planning (C) Alpha-beta pruning procedure (D) Min-max search

Last Answer : (C) Alpha-beta pruning procedure

Description : Which of the following is true for computation time in insertion, deletion and finding maximum and minimum element in a sorted array? (1) Insertion-O(1), Deletion-O(1), Maximum-O(1), Minimum-O(1) (2) Insertion-O(1), ... (1), Minimum-O(1) (4) Insertion-O(n), Deletion-O(n), Maximum-O(n), Minimum-O(n)

Last Answer : Answer: 3

Description : General algorithm applied on game tree for making decision of win/lose is ____________ a) DFS/BFS Search Algorithms b) Heuristic Search Algorithms c) Greedy Search Algorithms d) MIN/MAX Algorithms

Last Answer : d) MIN/MAX Algorithms

Description : When will Hill-Climbing algorithm terminate? a) Stopping criterion met b) Global Min/Max is achieved c) No neighbor has higher value d) All of the mentioned

Last Answer : c) No neighbor has higher value

Description : When will Hill-Climbing algorithm terminate? A : Stopping criterion met B : Global Min/Max is achieved C : No neighbour has higher value D : no criteria to terminate

Last Answer : C : No neighbour has higher value

Description : Which of the following algorithms has lowest worst case time complexity? a) Insertion sort b) Selection sort c) Quick sort d) Heap sort

Last Answer : d) Heap sort

Description : Consider the situation in which assignment operation is very costly. Which of the following sorting algorithm should be performed so that the number of assignment operations is minimized in general? a) Insertion sort b) Selection sort c) Heap sort d) None

Last Answer : b) Selection sort

Description : Which of the following algorithm design technique is used in the quick sort algorithm? a) Dynamic programming b) Backtracking c) Divide-and-conquer d) Greedy method

Last Answer : Which of the following algorithm design technique is used in the quick sort algorithm? a) Dynamic programming b) Backtracking c) Divide-and-conquer d) Greedy method

Description : Which of the following sorting algorithm is in-place a) Counting sort b) Radix sort c) Bucket sort d) None

Last Answer : b) Radix sort

Description : Consider the reference string 0 1 2 3 0 1 4 0 1 2 3 4 If FIFO page replacement algorithm is used, then the number of page faults with three page frames and four page frames are .......... and ........... respectively. (A) 10, 9 (B) 9, 9 (C) 10, 10 (D) 9, 10

Last Answer : (D) 9, 10

Description : Consider the fractional knapsack instance n = 4, (p1, p2, p3, p4) = (10, 10, 12, 18), (w1, w2, w3, w4) = (2, 4, 6, 9) and M = 15. The maximum profit is given by (Assume p and w denotes profit and weight of objects respectively) (A) 40 (B) 38 (C) 32 (D) 30

Last Answer : (B) 38

Description : Assuming there are n keys and each keys is in the range [0, m-1]. The run time of bucket sort is (A) O(n) (B) O(n lgn) (C) O(n lgm) (D) O(n+m)

Last Answer : (D) O(n+m)

Description : Using data p=3, q=11, n=pq, d=7 in RSA algorithm find the cipher text of the given plain text SUZANNE (A) BUTAEEZ (B) SUZANNE (C) XYZABCD (D) ABCDXYZ

Last Answer : (A) BUTAEEZ

Description : Consider three CPU intensive processes P1, P2, P3 which require 20, 10 and 30 units of time, arrive at times 1, 3 and 7 respectively. Suppose operating system is implementing Shortest Remaining Time first (preemptive scheduling) ... end of Ready queue are not counted). (A) 3 (B) 2 (C) 4 (D) 5

Last Answer : (A) 3

Description : The min and max size permissible for folded aerogramme is a) 100 X 140 & 120 X 120 b) 90 X 140 & 110 X 120 c) 80 X 140 & 100 X 120 d) None of the above

Last Answer : b) 90 X 140 & 110 X 120

Description : Size limit of book packet roll and other than roll is a) Min 10X17 cm & max 80X100, 10X7 cm & 60X30X30 cm b) Max 15 cm x 10.5 Cm min 10X7 cm c) Min11X22cm & max 60X40cm, min 20X17cm &max 90X100cm d) None of these

Last Answer : a) Min 10X17 cm & max 80X100, 10X7 cm & 60X30X30 cm

Description : Post card of private manufacture size limit is a) Min10X7cm & max 50X100cm, min 15X25cm &max 80X100cm b) Max 15 cm x 10.5 Cm min 10X7 cm c) Min11X22cm & max 60X40cm, min 20X17cm &max 90X100cm d) None of these

Last Answer : b) Max 15 cm x 10.5 Cm min 10X7 cm

Description : State True or False. i) Binary search is used for searching in a sorted array. ii) The time complexity of binary search is O(logn). A) True, False B) False, True C) False, False D) True, True

Last Answer : D) True, True

Description : A disk drive has 100 cylinders, numbered 0 to 99. Disk requests come to the disk driver for cyclinders 12, 26, 24, 4, 42, 8 and 50 in that order. The driver is currently serving a request at cyclinder 24. A seek takes ... (SSTF) algorithm? (A) 0.984 sec (B) 0.396 sec (C) 0.738 sec (D) 0.42 sec

Last Answer : C

Description : Consider the following statements: (a) Depth - first search is used to traverse a rooted tree. (b) Pre - order, Post-order and Inorder are used to list the vertices of an ordered rooted tree. (c) Huffman's algorithm is used to find an optimal ... (d) (C) (a) , (b) and (c) (D) (a), (b) , (c) and (d)

Last Answer : (D) (a), (b) , (c) and (d)

Description : ................... comparisons are necessary in the worst case to find both the maximum and minimum of n numbers. (A) 2n-2 (B) n + floor(lg n) - 2 (C) floor(3n/2) - 2 (D) 2 lg n – 2

Last Answer : (C) floor(3n/2) - 2

Description : Red-black trees are one of many Search tree schemes that are "balanced” in order to guarantee that basic dynamic-set operations take ............. time in the worst case. (1) O(1) (2) O(log n) (3) O(n) (4) O(n log n)

Last Answer : (2) O(log n) 

Description : Mark correct option a) Station articles are intended for delivery from a PO to which they are sent b) Sorting articles are articles that are to be sorted by the Poor Mail Office to which they ... Express bundle require to sort immediately & Differed bundle may be disposed later. e) All the above

Last Answer : e) All the above

Description : The time that depends on the input: an already sorted sequence that is easier to sort. a) Process b) Evaluation c) Running d) Input

Last Answer : Answer: c Explanation: The running time depends on the input: an already sorted sequence is easier to sort. The running time is given by the size of the input, since short sequences are easier to sort than the longer ones. Generally, we seek upper bounds on the running time, because it is reliable

Description : Two pumps M and N can separately fill a dumper in 36 minutes and 45 minutes respectively. Both the pumps are opened together but 12 minutes after the start the pump M is turned off. How much time will it take to fill the dumper? A) 9 min B) 10 min C) 30 min D) 32 min

Last Answer : C 12/36 + x/45 = 1 (12*5)/180+4x/180=1 60+4x=180 4x=120 X=120/4=30min

Description : Three pumps, M, N and O are opened to fill a tank such that M and N can fill the tank alone in 18 min. and 23 min. respectively and O can empty it in 15 min. After 3 minutes the emptying pipe is closed. In how many minutes the tank will be full in this way? A) 20 B) 25 C) 18 D) 12

Last Answer : D Let the tank full in x minutes, then M and N opened for x minutes and O for 3 minutes. (1/18 + 1/23)*x – (1/15)*3 = 1 (23+18/414)X=1+1/5 Solve, x = 12

Description : A train M speeding with 60km/hr crooses another train N, running in the same direction in 1 min. If the lengths of the trains M and N be 50m and 100m respectively. What is the speed of train N? A) 15 km/hr B) 61km/hr C) 51km/hr D) 50k/hr

Last Answer : ANSWER: C Explanation:  Let the speed of be train N be ‘x’km/hr  Speed of M relative to N = (60 – x)km/hr  = (60-x) * 5/18]m/s = (300 – 5x / 18)m/s  150 / (300 – 5x / 18) =60  2700/300-5x=60  2700=18000-300x 300x=15300  x= 153/3  x=51km/hr  Therefore the speed of the train is 51 km/hr

Description : Min copies and max size to be accepted in direct post is a) 5000 & A4 Size b) 1000 & A3 size c) 500 & Postcard size d) None of these

Last Answer : b) 1000 & A3 size

Description : Size limit of Inland letter card folded and unfolded is a) Min15.2X9cm & max 21X10cm, min 28.2X18.2cm max 30X21cm b) Min10X7cm & max 50X100cm, min 15X25cm &max 80X100cm c) Min11X22cm & max 60X40cm, min 20X17cm &max 90X100cm d) None of these

Last Answer : a) Min15.2X9cm & max 21X10cm, min 28.2X18.2cm max 30X21cm

Description : Size limit of letter and roll is a) Min11X7cm & max 60X90cm, min 10X17cm & max 88X100cm b) Min10X7cm & max 50X100cm, min 15X25cm &max 80X100cm c) Min11X22cm & max 60X40cm, min 20X17cm &max 90X100cm d) None of these

Last Answer : a) Min11X7cm & max 60X90cm, min 10X17cm & max 88X100cm

Description : The average case occurs in the Linear Search Algorithm when: (A) The item to be searched is in some where middle of the Array (B) The item to be searched is not in the array (C) The item to be searched is in the last of the array (D) The item to be searched is either in the last or not in the array

Last Answer : (A) The item to be searched is in some where middle of the Array

Description : If h is chosen from a universal collection of hash functions and is used to hash n keys into a table of size m, where n≤m, the expected number of collisions involving a particular key x is less than ................... (1) 1 (2) 1/n (3) 1/m (4) n/m

Last Answer : Answer: 1

Description : Which of the following conditions is true for repeated stress? 1. σ m = 0 2. σ m = σ max / 2 3. σ m = σ a 4. σ min = 0 5. σ min = - σ max 6. σ a = σ max / 2 where σ m = mean ... amplitude a. condition 2 and 3 b. condition 1, 3 and 5 c. condition 2, 4, and 6 d. condition 3,4, 5 and 6

Last Answer : c. condition 2, 4, and 6

Description : If h* represents an estimate of the cost of getting from the current node N to the goal node and h represents actual cost of getting from current node to the goal node, then A* algorithm gives an optimal solution ... h* us equal to h (B) h* overestimates h (C) h* underestimates h (D) none of these

Last Answer : (C) h* underestimates h

Description : Consider f(N) = g(N) + h(N) Where function g is a measure of the cost of getting from the start node to the current node N and h is an estimate of additional cost of getting from the current ... ? (A) A* algorithm (B) AO* algorithm (C) Greedy best first search algorithm (D) Iterative A* algorithm

Last Answer : (C) Greedy best first search algorithm

Description : Below are the few steps given for scan-converting a circle using Bresenham's Algorithm. Which of the given steps is not correct? (1) Compute d = 3 – 2r (where r is radius) (2) Stop if x> y (3) If d

Last Answer : If d≥0,then d=4 *(x-y)+10, x=x+1 and y=y+1