CS-502 Fundamentals Of Algorithms
Update MCQS For Mid Term
Solve By Vu Topper RM
85% To 100% Marks
For More Help Contact What’s app 03224021365
Heap sort is a/an _______ and ________ sorting algorithm.
A. Not in-place, not stable one
B. In-place, not stable one
C. Not in-place, stable one
D. In-place, stable one
In Bucket sort, if there are duplicates then each bin can be replaced by a
__________.
A. Hash table
B. Heap
C. Stack
D. Linked list
If there are duplicates in __________ sort, then each bin can be
replaced by a linked list.
A. Heap
B. Merge
C. Bucket
D. Quick
A sorting algorithm is called as ________ if duplicate elements remain
in the same relative position after sorting.
A. O(n) algorithm
B. Complex
C. Parallel
D. Stable
The average case running time of quick sort algorithm is theta
_________.
A. n x n log(n)
B. Log(n)
C. nlog(n)
D. (n)
Quick sort algorithm required a lot of comparisons in the
____________ condition.
A. Worst case
B. Best and Average case
C. Average case
D. Best case
Memoization is a part of ________ programming strategy.
A. dynamic
B. fast
C. memory
D. slow
For More Help Contact What’s app 03224021365
____________ programming is essentially recursion without repetition.
A. array
B. Dynamic
C. N log n
D. fast
In ____________, the size of recursive calls is totally depending on
how pivot is chosen.
A. Quick sort
B. Merge sort
C. Insert sort
D. Bubble sort
The main shortcoming of counting sort is that it is useful
for__________.
A. large integers
B. large real numbers
C. small real numbers
D. small integers
Comparison-based sorting algorithms always takes ____________ time.
A. Theta nlog(n)
B. Omega n(n^2)
C. Big Oh nlog(n)
D. Omega nlog(n)
Quick sort does not require any additional array for storage except for
recursive function calls is called __________.
A. In-Place
B. Stable
C. Not In-Place
D. Unsorted
While solving Selection problem, in Sieve technique we choose pivot
___________
A. Minimum element
B. Randomly
C. Average element
D. Maximum element
While applying the sieve technique, ___________ subarray will contain
all elements that are greater than pivot element x.
A. A[q+1....n]
B. A[1....n]
C. A[1....q-1]
For More Help Contact What’s app 03224021365
D. A[q]
The total running time for Selection algorithm is ___________ in n.
A. Exponential
B. Geometric
C. Quadratic
D. Linear
What is the worst-case time of a quick sort which happens rarely?
A. O(log n)
B. O(n log n)
C. O(n2)
D. O(n)
While applying the sieve technique, ___________ subarray will contain
all elements that are less than pivot element x.
A. A[q+1....n]
B. A[1....q-1]
C. A[1....n]
D. A[q]
A Principal operation for maintaining the heap property is called
heapify, it is also called:
A. Sifting Up
B. Sifting left
C. Sifting right
D. Sifting down Page 43
After partitioning array in Quick sort, pivot is placed in a position such
that
A. Values larger than pivot are on left and smaller than pivot are on
right
B. Pivot is the first element of array
C. Pivot is the last element of array
D. Values smaller than pivot are on left and larger than pivot are
on right Page 35
Sieve technique is a special case of ___________ strategy.
A. Greedy approach
B. Graph
C. Divide-and-Conquer
D. Dynamic programming
Selection sort takes theta __________ in the worst case.
A. (n)
B. (n^2)
For More Help Contact What’s app 03224021365
C. nlog(n)
D. n(logn)
Array divided into _____ subarrays while applying sieve technique to
selection problem.
A. 1
B. 2
C. 3
D. 4
If input “n” is odd, then median will be _________
A. n/2
B. n+2
C. (n-1)/2
D. (n+1)/2 Page 34
Quick sort is based on ____________ strategy.
A. Graph Theory
B. Greedy approach
C. Divide-and-Conquer
D. Dynamic programming
_________ is one of the few problems, where provable lower bounds
exist on how fast we can sort.
A. Sorting Page 39
B. Graphing
C. Searching
D. Both Searching & Sorting
In Quick sort algorithm, the subarray ______________ has elements
which are less than pivot element x.
A. A[q]
B. A[p....r]
C. A[q+1....r]
D. A[p....q-1]
In ___________ sorting algorithm, we just need to swap positions of
data during the Partitioning function.
A. Merge sort
B. Counting sort
C. Radix sort
D. Quick sort
Question No: 01 (Marks:1) Vu-Topper RM
There are __________ entries in the Edit Distance Matrix.
A. ϴ (n)
For More Help Contact What’s app 03224021365
B. ϴ (n2) Page 84 ok
C. ϴ (n+2)
D. ϴ (n + 100)
Question No: 02 (Marks:1) Vu-Topper RM
For average-case time analysis of quick sort algorithm, pivot selection
is on average basis from _________.
A. All possible random values Page 50 ok
B. Pivot is input separately
C. half of the input values
D. Values greater than 5
Question No: 03 (Marks:1) Vu-Topper RM
As per algorithm of dynamic programing, we need to store the result(s)
of __________.
A. First sub-problem only
B. Best solution only
C. Intermediate sub-problems Page 75 ok
D. Final solution only
Question No: 04 (Marks:1) Vu-Topper RM
In chain matrix multiplication, table is filled ______ to find the
multiplication of matrix.
A. row wise
B. column wise
C. diagonally
D. bottom-to-up Page 86
Question No: 05 (Marks:1) Vu-Topper RM
The only way to convert a string of i characters into the empty string is
with i deletions, represented as _____________.
A. E(0.j) =j
B. E(i.j) = 1
C. E(0.i) = j
D. E (i.0)=I Page 78 ok
Question No: 06 (Marks:1) Vu-Topper RM
If there are Θ (n²)entries in edit distance matrix then the total running
time is:
A. θ (n)
B. θ (1)
C. θ (n2) Page 84 ok
D. θ (n logn)
Question No: 07 (Marks:1) Vu-Topper RM
In average –case time analysis of quick sort algorithm , the most
For More Help Contact What’s app 03224021365
balanced case for partion is when we divide the list of elements into _.
A. Equal no. of pieces as of input elements
B. Single piece exactly
C. Two nearly equal pieces
D. Three nearly equal pieces
Question No: 08 (Marks:1) Vu-Topper RM
If matrix A of dimension p x q is multiplied with matrix B of dimension
q x r, then each entry in resultant matrix takes __________ time.
A. O (q) Page 84
B. (1)
C. (p x q)
D. (q x r)
Question No: 09 (Marks:1) Vu-Topper RM
Fibonacci Sequence was named on _______, a famous mathematician
in 12th Century.
A. Fred Brooks
B. Grady Booch
C. Leonardo Pisano Page 73
D. Edgar F. Codd
Question No: 10 (Marks:1) Vu-Topper RM
In quick sort algorithm, we choose pivot _______.
A. Always the smallest element
B. Greater than 5
C. Randomly Page 35
D. Less than 5
Question No: 11 (Marks:1) Vu-Topper RM
For comparison-based sorting algorithms, it is possible to sort more
efficiently than Omega n log(n) time.
A. Always
B. Sometimes not
C. NOT Page 54
D. Sometimes
Question No:12 (Marks:1) Vu-Topper RM
The sequence of merge sort algorithm is:
A. Divide Combine-Conquer
B. Conquer-Divide-Combine
C. Divide-Conquer-Combine Page 27
D. Combine-Divide-Conquer
Question No: 13 (Marks:1) Vu-Topper RM
In ______ Knapsack Problem, limitation is that an item can either be
For More Help Contact What’s app 03224021365
put in the bag or not. Fractional items are not allowed.
A. 0
B. 1
C. 0/1 Page 91
D. Fractional
Question No: 14 (Marks:1) Vu-Topper RM
In Selection algorithm, we assume pivot selection takes theta
__________ running time.
A. n Page 36
B. n2
C. n3
D. log (n)
Question No: 15 (Marks:1) Vu-Topper RM
In Heap Sort algorithm (using max heap), when every time maximum
element is removed from top ___________.
A. We call merge Sort Algorithm
B. it becomes Order n2 Algorithm
C. Divide and Conquer strategy helps us
D. We are left with a hole Page 41
Question No: 16 (Marks:1) Vu-Topper RM
_________ is a method of solving a problem in which we check all
possible solutions to the problem to find the solution we need.
A. Plane-Sweep Algorithm
B. Sorting Algorithm
C. Brute-Force Algorithm Google
D. Greedy approach
Question No: 17 (Marks:1) Vu-Topper RM
The worst case running time of quick sort algorithm ____________.
A. Is quadratic
B. Is linear
C. Cannot be quadratic
D. ls always Exponential
Question No: 18 (Marks:1) Vu-Topper RM
In max heap (for Heap Sort algorithm), when every time maximum
element is removed from top we replace it with ___________ leaf in the
tree.
A. Last Page 41
B. First
C. Any
D. Second last
Question No: 19 (Marks:1) Vu-Topper RM
For More Help Contact What’s app 03224021365
Quick sort algorithm was developed by –
A. AlferdAho
B. Sedgewick
C. John Vincent Atanasoff
D. Tony Hoare Google
Question No: 20 (Marks:1) Vu-Topper RM
If Matrix-A has dimensions “3×2” and Matrix-B has dimensions “2×3”,
then multiplication of Matrix-A and Matrix-B will result a new Matrix-
C having dimensions.
A. 3×2
B. 2×3
C. 2×2
D. 3×3
Question No: 21 (Marks:1) Vu-Topper RM
In Sorting the key value or attribute __________ from an ordered
domain.
A. Must be Page 39
B. Not always
C. May be
D. Occasionally
Question No: 22 (Marks:1) Vu-Topper RM
Result of asymptotical analysis of n(n -3) and 4n*n is that _______
A. n(n-1) is asymptotically Less
B. n(n-1) is asymptotically Greater
C. Both are asymptotically Not equivalent
D. Both are asymptotically Equivalent Page 23
Question No: 23 (Marks:1) Vu-Topper RM
Floor and ceiling are ______ to calculate while analyzing algorithms
A. Very easy
B. 3rd Option is missing
C. Usually considered difficult
D. 4th Option is missing
Question No: 24 (Marks:1) Vu-Topper RM
____ of reference is an important fact of current processor technology.
A. Defining
B. Assigning
C. Locality Page 8
D. Formality
Question No: 25 (Marks:1) Vu-Topper RM
For More Help Contact What’s app 03224021365
In max-heap, largest element is stored at root node. Where is the
smallest element stored?
A. Right Node
B. Leaf Node Google
C. Middle Node
D. Left Node
Question No: 26 (Marks:1) Vu-Topper RM
Which of the following is calculated with Big Omega notation?
A. Medium bounds
B. Upper bounds
C. Lower bounds Page 25
D. Both upper and lower bounds
Question No: 27 (Marks:1) Vu-Topper RM
Edit distance algorithm based on_____________strategy.
A. Greedy
B. Dynamic Programming Page 81 ok
C. Divide and Conquer
D. Searching
Question No: 28 (Marks:1) Vu-Topper RM
In Heapsort Algorithm, total time taken by heapify procedure is ____
A. O (log n) Page 43
B. (log2 n)
C. (n log n)
D. (n2 log n)
Question No: 29 (Marks:1) Vu-Topper RM
Al-Khwarizmi was a/an _______
Artist
A. Astronomer
B. Mathematication Page 7
C. Khalifah
Question No: 30 (Marks:1) Vu-Topper RM
When matrix A of 5 x 3 is multiplied with matrix B of 3 x 4 then the
number of multiplications required will be ____________.
A. 15
B. 12
C. 36
D. 60 Page 84
Question No: 31 (Marks:1) Vu-Topper RM
For More Help Contact What’s app 03224021365
Pseudo code of algorithms are to be read by _______.
A. People Page 12
B. RAM
C. Computer
D. Compiler
Question No: 32 (Marks:1) Vu-Topper RM
The sieve technique is a special case, where the number of sub-
problems is just ________
A. 1 Page 34
B. 2
C. 3
D. 4
Question No: 33 (Marks:1) Vu-Topper RM
When a recursive algorithm revisits the same problem over and over
again, we say that the optimization problem has _______________ sub-
problems.
A. Overlapping Google ok
B. Over costing
C. Optimized
D. Three
Question No: 34 (Marks:1) Vu-Topper RM
In order to say anything meaningful about our algorithms, it will be
important for us to settle on a ______.
A. Java Program
B. C++ Program
C. Pseudo program
D. Mathematically model of computation
Question No: 35 (Marks:1) Vu-Topper RM
Merge sort is based on _______.
A. Brute-force
B. Plan-sweep
C. Axis-sweep
D. Divide and Conquer
Question No: 36 (Marks:1) Vu-Topper RM
What time does Merge Sort algorithm take in order to sort an array of
‘n’ numbers?
A. Θ (n)
B. Θ (log n)
C. Θ (n^2)
D. Θ(n log n) Page 30
For More Help Contact What’s app 03224021365
Question No: 37 (Marks:1) Vu-Topper RM
algorithm, the first step is to ___________.
A. Call Build-Heap procedure Page 46
B. Sort the array in descending order
C. Call Heapify procedure
D. Find the number of input elements
Question No: 38 (Marks:1) Vu-Topper RM
The definition of theta-notation relies on proving ________ asymptotic
bound.
A. One
B. Lower
C. Upper
D. Both lower & upper Page 25
Question No: 39 (Marks:1) Vu-Topper RM
In merge sort algorithm, to merge two lists of size n/2 to a list of size n,
takes ___________ time.
A. Theta (n) Page 32
B. Theta log(n)
C. Theta log2(n)
D. Theta n log(n)
Question No: 40 (Marks:1) Vu-Topper RM
We can make _________ recursive calls in Fibonacci Sequence.
A. Infinite
B. Finite Google ok
C. Only one
D. Zero
Question No: 41 (Marks:1) Vu-Topper RM
Following is NOT the application of Edit Distance problem.
A. Speech recognition
B. Spelling Correction
C. Ascending Sort Page 76 ok
D. Computational Molecular Biology
Question No: 42 (Marks:1) Vu-Topper RM
In plane sweep approach, a vertical line is swept across the 2d-plane
and structure is used for holding the maximal points lying to the left of
the sweep line.
A. Tree
B. Array
C. Queue
D. Stack
For More Help Contact What’s app 03224021365
Question No: 43 (Marks:1) Vu-Topper RM
Time will vary according to the nature of input data.
_____ time is the maximum running time over all legal inputs.
A. Worst-case Page 13
B. Average-case
C. Best-case
D. Good-case
Question No: 44 (Marks:1) Vu-Topper RM
Efficient algorithm requires less computational…
A. Memory
B. Running Time
C. Memory and Running Time Page 9
D. Energy
Question No: 45 (Marks:1) Vu-Topper RM
Selection algorithm takes theta ______
A. (n2)
B. (n)
C. log(n)
D. n log(n)
Question No: 46 (Marks:1) Vu-Topper RM
Time complexity of Dynamic Programming based algorithm for
computing the minimum cost of Chain Matrix Multiplication is ______
A. Log n
B. n
C. n^2 (n square)
D. n^3 (n cube) Page 90
Question No: 47 (Marks:1) Vu-Topper RM
The Iteration method is used for ______
A. Solving Recurrence relations Page 31
B. Merging elements in Merge sort
C. Comparing sorting algorithms only
D. Dividing elements in Merge sort
Question No: 48 (Marks:1) Vu-Topper RM
In 3-Dimensional space, a point P has ______ coordinate(s).
A. (X, Y)
B. (X, 0)
C. (0, Y)
D. (X,Y, Z)
For More Help Contact What’s app 03224021365
Question No: 49 (Marks:1) Vu-Topper RM
Chain matrix multiplication problem can be solved through _______
strategy.
A. Dynamic programming Page 85
B. Greedy
C. Divide and conquer
D. Sorting
Question No: 50 (Marks:1) Vu-Topper RM
Merge sort have running time….running time of Heap sort. Not found
exactly
A. Greater than
B. Less than Google
C. Equal to
D. Different than
Question No: 51 (Marks:1) Vu-Topper RM
The Omega-notation allows us to state only the asymptotic ___ bounds.
A. Middle
B. Lower Page 25
C. Upper
D. Both lower & upper
Question No: 52 (Marks:1) Vu-Topper RM
Both lower &upperSorting can be in ________
A. Random order
B. Increasing order only
C. Decreasing order only
D. Both Increasing and Decreasing order
Question No: 53 (Marks:1) Vu-Topper RM
Quicksort is a/an _______ and ________ sorting algorithm.
A. Not in place, not stable one
B. In place , not stable one Page 54 ok
C. In place , stable one
D. Not in place , stable one
Question No: 54 (Marks:1) Vu-Topper RM
Consider three matrices X,Y,Z of dimensions 1×2, 2×3,3×4
respectively. The number of multiplications of (XY) Z is:
A. 18
B. 32
C. 24
D. 30
For More Help Contact What’s app 03224021365
Question No: 55 (Marks:1) Vu-Topper RM
In Dynamic Programming, our approach is to ____________.
A. Express the problem non-recursively
B. Build the solution in a bottom-up fashion Page 75 ok
C. Develop the solution in a top-down fashion
D. Input several sub-problems simultaneously
Question No: 56 (Marks:1) Vu-Topper RM
The knapsack problem is optimally solved by using brute force
algorithm.Counting sort is suitable to sort the elements in range 1 to K;
A. K is large
B. K is small Page 57
C. K may be large or small
D. None
Question No: 57 (Marks:1) Vu-Topper RM
Matrix multiplication is a(n) _______ operation.
A. Commutative
B. Associative Page 85
C. Neither commutative nor associative
D. Commutative but not associative
Question No: 58 (Marks:1) Vu-Topper RM
In Dynamic Programming approach, solution is modified/changed
_________.
A. Always once
B. At each stage Google ok
C. Only for specific problems
D. At 4th stage only
Question No: 59 (Marks:1) Vu-Topper RM
In Knapsack problem, the goal is to put items in the Knapsack such that
the value of the items is _______ subject to weight limit of knapsack.
A. Minimized
B. Decreased
C. Maximized Page 91
D. None of the given options
Question No: 60 (Marks:1) Vu-Topper RM
An in-place sorting algorithm is one that ___________ use(s) additional
array for storage.
A. Always
B. Permanently
C. Does not Page 54 ok
D. Sometime
For More Help Contact What’s app 03224021365
Question No: 61 (Marks:1) Vu-Topper RM
Dynamic Programming is a problem-solving approach in which___
A. Problem is solved in Zero time
B. Solution is developed only at final stage
C. Both are correct
D. Both are incorrect Google
Question No: 62 (Marks:1) Vu-Topper RM
In Fibonacci Sequence, each term is calculated by_______ previous
______ terms.
A. Subtracting, Two
B. Adding, Three
C. Adding, Two Page 73 ok
D. Multiplying, Two
Question No: 63 (Marks:1) Vu-Topper RM
Dynamic programming formulation of the matrix chain multiplication
problem will store the solutions of each sub problem in a(n):
A. Class
B. Array
C. Table
D. Variable
Question No: 64 (Marks:1) Vu-Topper RM
Sorting is performed on the basis of ___________.
A. Computational resources
B. Asymptotic notation
C. Summation
D. Some key value of attribute Page 39
Question No: 65 (Marks:1) Vu-Topper RM
In Heap Sort algorithm, we call Build-heap procedure _________.
A. Twice
B. Thrice
C. Only once Page 46
D. As many times as we need
Question No: 66 (Marks:1) Vu-Topper RM
In the statement “output P[1].x, P[1].y”, the number of times elements
of P are accessed is _______.
A. 1
B. 2 Page 14
C. 3
D. 4
For More Help Contact What’s app 03224021365
Question No: 67 (Marks:1) Vu-Topper RM
___________ provides us more accurate result, when input values are
not closer with each other.
A. Mode
B. Mean
C. Average
D. Median Page 34
Question No: 68 (Marks:1) Vu-Topper RM
The process of ______ ends when you are left with such tiny pieces
remaining that it is trivial to solve them.
A. Brute-force
B. Plan-sweep
C. Axis-sweep
D. Divide and Conquer
Question No: 69 (Marks:1) Vu-Topper RM
Rank of an element can be defined as ____________
A. One minus the number of elements that are smaller
B. Two plus the number of elements that are greater
C. One plus the number of elements that are smaller Page 34
D. Two minus the number of elements that are smaller
Question No: 70 (Marks:1) Vu-Topper RM
If the time complexity of an algorithm is given by O (1), then its time
complexity would be
A. Polynomial
B. Exponential
C. Constant Google
D. Average
Question No: 71 (Marks:1) Vu-Topper RM
The asymptotic growth of n(n+1)/2 is:
A. O(n)
B. O(n2)
C. O(n+2)
D. O(n log n)
Question No: 72 (Marks:1) Vu-Topper RM
Approach of solving geometric problems by sweeping a line across the
plane is called _____ sweep.
A. Line
B. Plane Page 18
C. Cube
D. Box
For More Help Contact What’s app 03224021365
Question No: 73 (Marks:1) Vu-Topper RM
In Sieve technique, we solve the problem _________
A. In recursive manner Page 34
B. Non recursively
C. Using Merge Sort algorithm
D. Using Brute force technique
Question No: 74 (Marks:1) Vu-Topper RM
One of the limitation in 0/1 knapsack is that an item can either be ____
in the bag or not.
A. Use
B. Put Page 91
C. Move
D. Store
Question No: 75 (Marks:1) Vu-Topper RM
Which one is not passed as parameter in Quick sort algorithm?
A. End of the array
B. Start of the array
C. Middle of the array
D. Array (containing input elements) Google
Question No: 76 (Marks:1) Vu-Topper RM
In the analysis of Selection algorithm, we get the convergent
______________ series.
A. Harmonic
B. Linear
C. Arithmetic
D. Geometric Page 37
Question No: 77 (Marks:1) Vu-Topper RM
A Random Access Machine (RAM)is an idealized machine withrandom
access memory.
A. Infinite large Page 10
B. 512 MB
C. 256 MB
D. 2 GBs
Question No: 78 (Marks:1) Vu-Topper RM
While analyzing Selection algorithm, we make a number of passes, in
fact it could be as many as ________.
A. n(n+1)
B. log(n) Page 37
C. n/3
D. n/4
For More Help Contact What’s app 03224021365
Question No: 79 (Marks:1) Vu-Topper RM
In Random Access Machine (RAM), instructions are executed in
A. Parallel
B. Batch
C. One by One Page 10
D. Multiple times
Question No: 80 (Marks:1) Vu-Topper RM
In selection problem, the rank of an element will be its _____ position
A. First
B. final Page 34
C. Second last
D. Last
Question No: 81 (Marks:1) Vu-Topper RM
The worst-case running time of Merge sort is _____ in order to sort an
array of n elements.
A. O(log n)
B. O(n)
C. O(n log n) Page 40
D. O(n)
Question No: 82 (Marks:1) Vu-Topper RM
f(n) and g(n) are asymptotically equivalent. This means that they have
essentially the same ______.
A. Size
B. Results
C. Variables
D. Growth Rates
Question No: 83 (Marks:1) Vu-Topper RM
An algorithm is a mathematical entity. Which is independent of ____.
A. Programming language
B. Machine and Programming language
C. Compiler and Programming language
D. Programing Language Compiler and Machine
Question No: 84 (Marks:1) Vu-Topper RM
In Quick sort algorithm, Pivots form ___
A. Stack
B. Queue
C. Graph
D. Binary Search Tree Page 49
Question No: 85 (Marks:1) Vu-Topper RM
Counting sort is suitable for sorting the elements within range 1 to P,
For More Help Contact What’s app 03224021365
where ________
A. P is large
B. P is Small ok
C. P is very large
D. P is undetermined
Question No: 86 (Marks:1) Vu-Topper RM
In asymptotical analysis of n'(5 2)-3, as n becomes large, the dominant
(fastest growing) term is some constant times
A. n_1
B. n
C. n+1
D. n*n p-23
Question No: 87 (Marks:1) Vu-Topper RM
___ Items are not allowed in the 0/1 knapsack.
A. Lighter
B. Whole
C. Weighty
D. Fractional
Question No: 88 (Marks:1) Vu-Topper RM
In partition algorithm, the subarray ______________ has elements
which are greater than pivot element x.
A. A[q]
B. A[p…r]
C. A[p…q-1]
D. A[q+1…r] Page 46
Question No: 89 (Marks:1) Vu-Topper RM
In Heap Sort algorithm, if heap property is violated:
A. We ignore.
B. We call Heapify procedure Page 43
C. We call Build Heap procedure.
D. Heap property can never be violated.
Question No: 90 (Marks:1) Vu-Topper RM
______ is not a characteristic of Random Access Machine.
A. Assigning a value to a variable
B. Locality of reference
C. Single-Processor Page 10
D. Executing an arithmetic instruction
Question No: 91 (Marks:1) Vu-Topper RM
The only way to convert an empty string into a string of j characters is
For More Help Contact What’s app 03224021365
by doing j insertions, represented as _____________.
A. E(i,j) = 1
B. E(I,0) = I
C. E(0,j) = j Page 78 ok
D. E(1,j)= j
Question No: 92 (Marks:1) Vu-Topper RM
In Selection problem, the Sieve technique works in ___________
A. Non-recursive manner
B. Constant time
C. Phases Page 34
D. One complete go
Question No: 93 (Marks:1) Vu-Topper RM
Algorithm is a sequence of computational steps that —- the input into
output.
A. Merge
B. Assign
C. Transform Page 7
D. Integrate
Question No: 94 (Marks:1) Vu-Topper RM
If pj dominates pi and pi dominates ph then pj also dominates ph, it
means dominance relation is
A. Transitive Page 18
B. Non Transitive
C. Equation
D. Symbolic
Question No: 95 (Marks:1) Vu-Topper RM
To find maximal points in brute-force algorithm each point of the space
is compared against ______ of that space.
A. One other point
B. All other points Page 11
C. Few other points
D. Most of the other points
Question No: 96 (Marks:1) Vu-Topper RM
In the following code the statement “cout<<j;”executes ——— times.
for (j=1; j<=5; j = j+2)
cout<<j;
A. 5 times
B. 2 times
C. 3 times
D. 0 times
For More Help Contact What’s app 03224021365
Question No: 97 (Marks:1) Vu-Topper RM
In merge sort algorithm, we split the array around the ______ index q.
A. Mid Page 17
B. Exiting
C. Entring
D. Summing
Question No: 98 (Marks:1) Vu-Topper RM
In Selection problem, the Sieve technique ___________
A. Add some more input items each time
B. Do not work recursively
C. Do not uses Divide and Conquer approach
D. Eliminates undesired data items each time Page 35
Question No: 99 (Marks:1) Vu-Topper RM
Consider three matrices X, Y, Z of dimensions 1 x 2 , 2 x 3 , 3 x 4
respectively. The number of multiplications of (XY)Z is:
A. 16
B. 32 Page 84
C. 30
D. 26
Question No:100 (Marks:1) Vu-Topper RM
In Heap Sort algorithm, the total running time for Heapify procedure is
____________.
A. Theta (log n) Page 43
B. Order (log n)
C. Omega (log n)
D. O(1) i.e. Constant time
Question No:101 (Marks:1) Vu-Topper RM
The sieve technique works where we have to find _________ item(s)
from a large input.
A. Single Page 34
B. Two
C. Three
D. Similar
Question No:102 (Marks:1) Vu-Topper RM
In Dynamic Programming based solution of Knapsack Problem, if we
decide to take an object i , then we gain______
A. W(Total Weight of Knapsack)
B. V (Total Value of all items)
C. vi (Value of object i) Page 93
D. None of the given option
Question No:103 (Marks:1) Vu-Topper RM
For More Help Contact What’s app 03224021365
While Sorting, the order domain means for any two input elements x
and y__ satisfies only.
A. x < y Page 39
B. x > y
C. x = y
D. All of the above
Question No:104 (Marks:1) Vu-Topper RM
For solving Selection problem, we introduced Sieve technique due to
__________
A. Using Decrease and Conquer strategy Page 34
B. Avoiding to sort all input data
C. Eliminating Rank of an element
D. Using Brute-force approach
Question No:105 (Marks:1) Vu-Topper RM
In quick sort algorithm, _________ decides nature of Binary Search
Tree formed by pivots.
A. Rank of the pivot Page 49
B. Middle element from input
C. Smallest element from input
D. Largest element from input
Question No:106 (Marks:1) Vu-Topper RM
In plane sweep approach, a vertical line is swept across the 2d-plane
from_____.
A. Right to Left
B. Left to Right Page 18
C. Top to Bottom
D. Bottom to top
Question No:107 (Marks:1) Vu-Topper RM
For _________ values of n, any algorithm is fast enough.
A. Medium
B. Large
C. Small Page 14
D. Infinity
Question No:108 (Marks:1) Vu-Topper RM
Dynamic programming comprises of _______.
A. Recursion only
B. Repetition only
C. Recursion with Repetition
D. No Repetition but Recursion Page 75
For More Help Contact What’s app 03224021365
Question No:109 (Marks:1) Vu-Topper RM
The function f(n)=n(logn+1)/2 is asymptotically equalient t nlogn :
Here Lower Bound means function f(n) grows asymptotically at __ as
fast as nlog n.
A. Least Page 23
B. Normal
C. Most
D. AT
Question No:110 (Marks:1) Vu-Topper RM
Counting sort has time complexity.
A. O(n+k)
B. O(n) Page 58
C. O(k)
D. O(nlogn)
Question No:111 (Marks:1) Vu-Topper RM
Due to left complete nature of binary tree, the heap can be stored in
A. Array Page 40
B. Structures
C. Link List
D. Stack
Question No:112 (Marks:1) Vu-Topper RM
Single item from a larger set of ________.
A. Constant
B. Pointers
C. Phases
D. n items Page 34
Question No:113 (Marks:1) Vu-Topper RM
In the clique cover problem, for two vertices to be in the same group,
they must be ______ each other.
A. Apart from
B. Far from
C. Near to
D. Adjacent to Page 76
Question No:114 (Marks:1) Vu-Topper RM
How much time merge sort takes for an array of numbers?
A. T(n^2)
B. T(n)
C. T(log n)
D. T(n log n) Page 40
For More Help Contact What’s app 03224021365
Question No:115 (Marks:1) Vu-Topper RM
In in-place sorting algorithm is one that uses arrays for storage.
A. No additional array Page 54
B. An additional array
C. Both of above may be true according to algorithm
D. More than 3 arrays of one dimension
Question No:116 (Marks:1) Vu-Topper RM
Brute-force algorithm for 2D-Maxima is operated by comparing ______
pairs of points.
A. Two
B. Some
C. Most
D. All Page 18
Question No:117 (Marks:1) Vu-Topper RM
While Sorting, the ordered domain means for any two input elements x
and y _________ satisfies only.
A. x > y
B. x < y
C. x = y
D. All of the above Page 38
Question No:118 (Marks:1) Vu-Topper RM
Quick sort is.
A. Not stable but in place Page 54
B. Stable but not in place
C. Stable & in Place
D. Some time stable & some times in place
Question No:119 (Marks:1) Vu-Topper RM
Which may be a stable sort?
A. Merger
B. Insertion
C. Both above Page 54
D. None of the above
Question No:120 (Marks:1) Vu-Topper RM
For the Sieve Technique we take time.
A. T(nk) Page 34
B. IT(n / 3)
C. n^2
D. n/
For More Help Contact What’s app 03224021365
Question No:121 (Marks:1) Vu-Topper RM
Continuation sort is suitable to sort the elements in range 1 to k.
A. K is Large
B. K is not known
C. K may be small or large
D. K is small Page 54
Question No:122 (Marks:1) Vu-Topper RM
Asymptotic growth rate of the function is taken over ______ case
running time. .
A. Worst Page 14
B. Average
C. Best
D. Normal
Question No:123 (Marks:1) Vu-Topper RM
Before sweeping a vertical line in plane sweep approach, in start sorting
of the points is done in increasing order of their _____ coordinates. .
A. Y
B. Z
C. X
D. X , Y
Question No:124 (Marks:1) Vu-Topper RM
In Quick sort, we don’t have the control over the sizes of recursive
calls.
A. True Page 49
B. False
C. Less information to decide
D. Ether true or false
Question No:125 (Marks:1) Vu-Topper RM
Random access machine or RAM is a/an.
A. Machine build by Al-Khwarizmi
B. Mechanical machine
C. Mathematical model Page 10
D. Electronics machine
Question No:126 (Marks:1) Vu-Topper RM
A heap is a left-complete binary tree that confirms to the ________.
A. increasing order only
B. decreasing order only
C. heap order Page 40
D. log n order
For More Help Contact What’s app 03224021365
Question No:127 (Marks:1) Vu-Topper RM
Which one of the following sorting algorithms is the fastest?
A. Merge sort
B. Quick sort ok
C. Insertion sort
D. Heap sort
Question No:128 (Marks:1) Vu-Topper RM
Quick sort algorithm divide the entire array into _____ sub arrays.
A. 2 ok
B. 3
C. 4
D. 5
Question No:129 (Marks:1) Vu-Topper RM
In brute force algorithm, we measure running time T(n) based on ____.
A. Worst-case time and best-case time
B. Worst-case time and average-case time Page 46
C. Average-case time and best-case time
D. Best-case time and staring-case time
Question No:130 (Marks:1) Vu-Topper RM
algorithm first of all _______.
A. Sorts all points
B. Delete some points
C. Output the elements
D. Pushes all points on stack
Question No:131 (Marks:1) Vu-Topper RM
Which symbol is used for Omega notation?
A. (O)
B. (ϴ)
C. (Ω)
D. (@)
Question No:132 (Marks:1) Vu-Topper RM
Selection sort is a ____________sorting algorithm.
A. In-place Page 54 ok
B. Not In-Place
C. Stable
D. in-partition
Question No:133 (Marks:1) Vu-Topper RM
We do not need to prove comparison-based sorting algorithms by
mathematically. It always takes _________ time.
For More Help Contact What’s app 03224021365
A. Big Oh nlog(n)
B. Omega nlog(n)
C. Omega n(n^2)
D. Theta nlog(n)
Question No:134 (Marks:1) Vu-Topper RM
Merge sort is a/an _______ and ________ sorting algorithm
A. Not in-place, not stable one
B. In-place, not stable one
C. In-place, stable one
D. Not in-place, stable one Page 54 ok
Question No:135 (Marks:1) Vu-Topper RM
Cubic function will ________ a quadratic function.
A. Prove
B. Be equal to
C. Overtake Page 25
D. Find
Question No:136 (Marks:1) Vu-Topper RM
Insertion sort is a ____________sorting algorithm.
A. Unstable
B. In-place Page 54 ok
C. Not In-Place
D. in-partition
Question No:137 (Marks:1) Vu-Topper RM
To check whether a function grows faster or slower than the other
function, we use some asymptotic notations, which is ________.
A. Big-oh notation
B. Theta notation
C. Omega notation
D. All of the given
Question No:138 (Marks:1) Vu-Topper RM
Asymptotic growth of 8n^2 + 2n – 3 is:
A. Θ(n^2 + n)
B. Θ (n^2) Page 14
C. Θ(8n^2)
D. Θ(8n^2 + 2n)
Question No:139 (Marks:1) Vu-Topper RM
In the analysis of algorithms, _________ plays an important role.
A. Time
B. Money
C. Growth rate
For More Help Contact What’s app 03224021365
D. Text analysis
Question No:140 (Marks:1) Vu-Topper RM
In inductive approach of knapsack problem, we consider 2 cases, ____
Or ________.
A. Median, Mode
B. Recursive, Iterative
C. Leave object, Take object Page 93
D. Sequentially. Parallel
Question No:141 (Marks:1) Vu-Topper RM
Random Access Machine (RAM) can execute _________ instructions
A. Parallel
B. Only logical
C. Only arithmetic
D. Logical and arithmetic
Question No:142 (Marks:1) Vu-Topper RM
Using _______ algorithm, efficiency is not given much importance
A. Greedy
B. Merge sort
C. Processing
D. Brute Force
Question No:143 (Marks:1) Vu-Topper RM
Bubble sort takes theta _________ in the worst case
A. (n2) Page 39
B. (n)
C. log(n)
D. nlog(n)
Question No:144 (Marks:1) Vu-Topper RM
Using base condition we set all m[i,i] = ___________ ?
A. 1
B. 0 Page 86
C. ∞
D. -1
Question No:145 (Marks:1) Vu-Topper RM
Dynamic Programming algorithms often use some kind of
___________ to store the results of intermediate sub-problems.
A. Stack
B. Loop
C. Table ok
D. variable
Question No:146 (Marks:1) Vu-Topper RM
For More Help Contact What’s app 03224021365
___________________is in-place sorting algorithm.
A. Bubble sort Page 54 ok
B. Merge sort
C. Linear search
D. Binary Search
Question No:147 (Marks:1) Vu-Topper RM
Which one of the following problems can be solved using dynamic
problem?
A. Bubble sort problem
B. Greedy search problem
C. Fractional knapsack problem
D. Matrix chain multiplication problem Page 85
Question No:148 (Marks:1) Vu-Topper RM
In chain matrix multiplication, solutions of the sub-problems are stored
in a_________.
A. Array
B. Table Page 86
C. Tree
D. Link list
Question No:149 (Marks:1) Vu-Topper RM
What is the average running time of a quick sort algorithm?
A. O(n^2)
B. O(n)
C. O(n log n) Page 49 ok
D. O(log n)
Question No:150 (Marks:1) Vu-Topper RM
Sorting Algorithms having O _______ running time are considered to
be slow ones.
A. (n)
B. (n^2) Page 39
C. (nlog(n))
D. (log(n))
Question No:151 (Marks:1) Vu-Topper RM
While solving Selection problem, in Sieve technique we partition input
data __________
A. Randomly
B. According to Pivot Page 35
C. In increasing order
D. In decreasing order
Question No:152 (Marks:1) Vu-Topper RM
For More Help Contact What’s app 03224021365
__________ is the process of avoiding unnecessary repetitions by
writing down the results of recursive calls and looking them up again if
we need them later.
A. Loop
B. Function
C. Recursion
D. Memoization Page 74 ok
Question No:153 (Marks:1) Vu-Topper RM
In average-case time the probability of seeing input is denoted by ____.
A. p{I}
B. p[I]
C. p<i>
D. p(i) Page 13
Question No:154 (Marks:1) Vu-Topper RM
While applying the Sieve technique to selection sort, how to choose a
pivot element.
A. Through mean
B. Linear
C. Randomly Page 35
D. Sequentially
Question No:155 (Marks:1) Vu-Topper RM
Number of _______ of the pseudo code are counted to measure the
running time.
A. Inputs
B. Outputs
C. Steps Page 13
D. Pages
Question No:156 (Marks:1) Vu-Topper RM
Developing a dynamic programming algorithm generally involves
__________ separate steps.
A. One
B. Two Page 75 ok
C. Three
D. Four
Question No:157 (Marks:1) Vu-Topper RM
8n^2+2n+3 will exceed c28(n), no matter how large we make _____.
A. n
B. 2n
C. c2 Page 25
D. this quadratic equation
For More Help Contact What’s app 03224021365
Question No:158 (Marks:1) Vu-Topper RM
The running time of quick sort algorithm _________.
A. Is impossible to compute
B. Has nothing to do with pivot selection
C. Is Random upon each execution
D. Is Greatly influenced by the selection of pivot Page 49
Question No:159 (Marks:1) Vu-Topper RM
_________ involves breaking up the problem into sub problems whose
solutions can be combined to solve the global problem.
A. Complexity Theory
B. Greedy Algorithms
C. Divide and Conquer Strategy Page 34
D. Dynamic programming solution
Question No:160 (Marks:1) Vu-Topper RM
In ____________ we have to find rank of an element from given input.
A. Merge sort algorithm
B. Selection problem Page 34
C. Brute force technique
D. Plane Sweep algorithm
Question No:161 (Marks:1) Vu-Topper RM
How many steps are involved to design the dynamic programming
strategy?
A. 2
B. 4 Page 92
C. 3
D. 1
Question No:162 (Marks:1) Vu-Topper RM
In bin sort, each bin can be replaced by a ______________ in case of
duplication.
A. Heap
B. Stack
C. Hash table
D. Linked list Page 69 ok
Question No:163 (Marks:1) Vu-Topper RM
In merge sort algorithm, we split the array ______ to find index q.
A. from end
B. from start
C. midway Page 28
D. both from start or end
For More Help Contact What’s app 03224021365
Question No:164 (Marks:1) Vu-Topper RM
Find the maximum value of the items which can carry using knapsack
Knapsack weight capacity = 50.
Item Weight Value
11070
22020
33080
470 200
A. 90
B. 280
C. 200
D. 100
Question No:165 (Marks:1) Vu-Topper RM
In 2-d maxima problem a point p is said to be dominated by point q if_.
A. p.x<= q.x
B. bp.x<= q.x and p.y<= q.y Page 17
C. p.y<= q.y
D. p.x>= q.x and p.y>=q.y
Question No:166 (Marks:1) Vu-Topper RM
Sorting can be in ______________.
A. Increasing order only
B. Decreasing order only
C. Both increasing and decreasing order Page 39
D. Random order
Question No:167 (Marks:1) Vu-Topper RM
Recurrence can be described in terms of_____________.
A. Array
B. Linear
C. Tree Page 31
D. Graph
Question No:168 (Marks:1) Vu-Topper RM
The brute-force algorithm for 2D-Maxima runs in order O(__) time.
A. n
B. n(log n)
C. n*n Page 18
D. n3
Question No:169 (Marks:1) Vu-Topper RM
In plane sweep approach of solving geometric problems, a _________
is swept across the plane.
A. Line Page 18
For More Help Contact What’s app 03224021365
B. Plane
C. Cube
D. Box
Question No:170 (Marks:1) Vu-Topper RM
Which of the following is calculated with Big Omega notation?
A. Upper bounds
B. Lower bounds Page 25
C. Medium bounds
Question No:171 (Marks:1) Vu-Topper RM
_________ is always based on divide and conquer strategy.
A. Bubble sort
B. Selection sort
C. Pigeon sort
D. Quick sort Page 46
Question No:172 (Marks:1) Vu-Topper RM
If a matrix has three rows and two columns, then dimensions of matrix
will be:
A. 3×2
B. 2×3
C. 3×3
D. 2×2
Question No:173 (Marks:1) Vu-Topper RM
Asymptotic notations are used to describe _______ of an algorithm.
A. Size
B. Length
C. Running time Google
D. Compile time
Question No:174 (Marks:1) Vu-Topper RM
Catalan numbers are related the number of different ______ on 'n'
nodes.
A. Arrays
B. linked lists
C. binary trees Page 85
D. functions
Question No:175 (Marks:1) Vu-Topper RM
Applying the sieve technique to selection problem,
___________element is picked from array.
A. Pivot Page 35
B. Total
C. Input
For More Help Contact What’s app 03224021365
D. Output
Question No:176 (Marks:1) Vu-Topper RM
In recursive formulation of knapsack Problem: V [0, j] = ____ for j>=0
A. 2
B. -1 Page 93
C. 1
D. 2
Question No:177 (Marks:1) Vu-Topper RM
________ is a linear time sorting algorithm.
A. Merge sort
B. Radix sort Page 71 ok
C. Quick sort
D. Bubble sort
Question No:178 (Marks:1) Vu-Topper RM
Quick sort is one of the _______________sorting algorithm.
A. Fastest Page 19
B. Slowest
C. Major
D. Average
Question No:179 (Marks:1) Vu-Topper RM
The time assumed for each basic operation to execute on RAM model
of computation is _____.
A. Infinite
B. Continuous
C. Constant Page 10
D. Variable
Question No:180 (Marks:1) Vu-Topper RM
While analyzing algorithms, __________and ___________ are usually
considered difficult to calculate.
A. Floor, ceiling Google
B. Row, Column
C. Finite, Infinite
D. Graph, Tree
Question No:181 (Marks:1) Vu-Topper RM
While analysis of the brute-force maxima algorithm, an array sorted in
the reverse order is the type of _________ case input.
A. Best
B. Worst Page 14
C. Somewhat bad
D. Average
For More Help Contact What’s app 03224021365
Question No:182 (Marks:1) Vu-Topper RM
_________ is not useful measure of central tendency of given input set
especially when the distribution of values is highly skewed.
A. Mean
B. Mode
C. Average
D. Median Page 34
Question No:183 (Marks:1) Vu-Topper RM
In asymptotical analysis of n(n-3) and 4n*n, as n becomes large, the
dominant (fastest growing) term is some constant times _______.
A. n+1
B. n-1
C. n
D. n*n Page 23
Question No:184 (Marks:1) Vu-Topper RM
In addition to passing in the array itself to merge sort algorithm, we will
pass in _________other arguments which are indices.
A. Three
B. Two
C. Four
D. Five
Question No:185 (Marks:1) Vu-Topper RM
In 2d-maximal problem, a point is said to be if it is not dominated by
any other point in that space.
A. Member
B. Minimal
C. Maximal
D. Joint
Question No:186 (Marks:1) Vu-Topper RM
Counting sort assumes that the numbers to be sorted are in the range
______________.
A. K to n where n is large
B. K to n where k is small
C. 1 to k where k is small ok
D. k to n where n is small
Question No:187 (Marks:1) Vu-Topper RM
Insertion sort is an efficient algorithm for sorting a ____________
number of elements.
A. Small
B. Large Page 39
For More Help Contact What’s app 03224021365
C. Extra large
D. Medium
Question No:188 (Marks:1) Vu-Topper RM
If the indices passed to merge sort algorithm are ________,then this
means that there is only one element to sort.
A. Small Page 28
B. Large
C. Equal
D. Not Equal
Question No:189 (Marks:1) Vu-Topper RM
In Knapsack Problem, each item must be entirely accepted or rejected,
is called ______ problem.
A. Linear
B. Fractional
C. 0-1
D. Optimal
Question No:190 (Marks:1) Vu-Topper RM
If the time complexity of an algorithm is O(n). then it is called _______
time complexity.
A. Linear
B. Constant
C. Average
D. Exponential
Question No:191 (Marks:1) Vu-Topper RM
In the case of ________, analysis does not depend upon on the
distribution of input.
A. Merge sort
B. Insertion sort
C. Quick Sort ok
D. Heap sort
Question No:192 (Marks:1) Vu-Topper RM
We can use the _______________ property to devise a recursive
formulation of the edit distance problem.
A. Small substructure
B. Algorithmic
C. Real
D. Optimal substructure Page 78 ok
Question No:193 (Marks:1) Vu-Topper RM
The following sequence is called
_____________.1,2,3,5,8,13,21,34,55,…..
For More Help Contact What’s app 03224021365
A. Fibonacci sequence Page 73 ok
B. Optimal sequence
C. Optimize Sequence
D. Overlapping sequence
Question No:194 (Marks:1) Vu-Topper RM
Which one sorting algorithm is best suited to sort an array of 2 million
elements?
A. Insert sort
B. Bubble Sort Page 71 ok
C. Merge sort
D. Quick sort
Question No:195 (Marks:1) Vu-Topper RM
We can improve the performance of quick sort if we could be able to
___________.
A. Select two or more pivots Page 34 ok
B. Skip any sub-array completely
C. Skit Input elements somehow
D. Eliminate recursive calls
Question No:196 (Marks:1) Vu-Topper RM
The problem with the brute-force algorithm is that is uses ________ in
pruning out de
A. Worst-case time
B. No intelligence Page 18
C. Outside looping
D. Artificial intelligence
Question No:197 (Marks:1) Vu-Topper RM
In Heap Sort algorithm, Heapify procedure is ____________ in nature.
A. Recursive Page 43
B. Non-Recursive
C. Fast
D. Slow
Question No:198 (Marks:1) Vu-Topper RM
An algorithm is said to be correct if for every ______ instance, it halts
with the correct ______.
A. Input, Output Page 13
B. Design, Analysis
C. Value, Key
D. Key, Analysis
Question No:199 (Marks:1) Vu-Topper RM
If we have an equation 8n2+7f*n + 5f + 6 then is large, ________ term
For More Help Contact What’s app 03224021365
will be muchxxxxxxxthe n term and will dominate the running time.
A. f g (n)
B. g (n) * 2
C. n * 2 Page 23
D. f (n)
Question No:200 (Marks:1) Vu-Topper RM
For quick sort algorithm, partitioning takes theta ______.
A. (n)
B. log(n)
C. n log (n)
D. n2log (n) Google
Question No:201 (Marks:1) Vu-Topper RM
In Heap Sort algorithm, the maximum levels an element can move
upward is _________.
A. Theta (log n) Page 43
B. Big-ch (log n)
C. Omega (log n)
D. 0 (1) i.e. Constant time
Question No:202 (Marks:1) Vu-Topper RM
Which process is used for avoiding unnecessary repetitions and looking
them up again if we need them later.
A. Greedy Approach
B. Memoization Page 74 ok
C. Divide and conquer
D. Recursion
Question No:203 (Marks:1) Vu-Topper RM
The worst-case running time of Quick sort is _________ in order to sort
an array of n element.
A. O(n log n) Page 49
B. O(n)
C. O(n2)
D. O(log n)
Question No:204 (Marks:1) Vu-Topper RM
Boolean operation is a _________ operation on an idealized RAM
model of computation.
A. Advance
B. String
C. Basic
D. Normal
Question No:205 (Marks:1) Vu-Topper RM
For More Help Contact What’s app 03224021365
In chain matrix multiplication, if there are n items, there are ______
ways in which outer most pair of parentheses can placed.
A. n^2
B. 2n
C. n+1
D. n-1 Page 85
Question No:206 (Marks:1) Vu-Topper RM
The number of nodes in a complete binary tree of height h is:
A. (h+1) – 1
B. (h+1)
C. 2^(h+1) – 1 Page 40
D. ((h+1)^2) – 1
Question No:207 (Marks:1) Vu-Topper RM
In Sieve Technique, we know the item of interest.
A. True
B. False
Question No:208 (Marks:1) Vu-Topper RM
The Huffman codes provide a method of encoding data inefficiently
when coded using ASCII standard.
A. True
B. False Page 99
Question No:209 (Marks:1) Vu-Topper RM
In Heap Sort algorithm, we build _______ for ascending sort.
A. Min heap
B. Max Heap Page 41
C. Both
D. None of these
Question No:210 (Marks:1) Vu-Topper RM
Quick sort is a recursive algorithm.
A. True
B. False
Question No:211 (Marks:1) Vu-Topper RM
In Heap Sort algorithm, to remove the maximum element every
time,______________.
A. Nothing happens
B. We call heapify procedure Google
C. We call Build-Heap procedure
D. Heap Sort algorithm terminates without result
Question No:212 (Marks:1) Vu-Topper RM
For More Help Contact What’s app 03224021365
When a heapify procedure is applied to the root node to restore the
heap, then at each level, the comparison performed takes time:
A. It will take O(1). Page 43
B. It will take Θ(log n).
C. It can not be predicted.
D. Time will vary according to the nature of input data.
Question No:213 (Marks:1) Vu-Topper RM
What is the best case time complexity of merge sort?
A. O((n^2)
B. O((nlogn) Google
C. O((nlogn^2)
D. O((n^2logn)
Question No:214 (Marks:1) Vu-Topper RM
In Heap Sort algorithm, the first step is to _________.
A. Call Heapify procedure
B. Call Build-Heap procedure Page 46
C. Sort the array in descending order
D. Find the number of input elements
Question No:215 (Marks:1) Vu-Topper RM
Merge sort algorithm discussed in handouts contains ________.
A. 1 loop
B. 3 loops
C. 2 loops Google
D. 4 loops
Question No:216 (Marks:1) Vu-Topper RM
In ___________, Leonardo of Pisa, also called Fibonacci, published a
book.
A. 1102
B. 1202 Google ok
C. 1400
D. 1304
Question No:217 (Marks:1) Vu-Topper RM
If matrix A of dimension 2 x 4 is multiplied with matrix B of dimension
4 x 3, then the dimension of resultant matrix will be _________.
A. 2x3 Page 84
B. 4x3
C. 3x4
D. 2x4
Question No:218 (Marks:1) Vu-Topper RM
In generating Fibonacci Sequence, we can avoid unnecessary
For More Help Contact What’s app 03224021365
repetitions by __________ process.
A. Loop
B. Function
C. Recursion
D. Memoization Page 43 ok
Question No:219 (Marks:1) Vu-Topper RM
Algorithms similar to those for the ______________ problem are used
in some speech recognition systems.
A. Counting
B. heap sort
C. Fibonacci
D. edit-distance Page 77 ok
Question No:220 (Marks:1) Vu-Topper RM
Radix sort performs sorting the numbers ______ digit(s) at a time.
A. One Page 71 ok
B. Two
C. All
D. Four
Question No:221 (Marks:1) Vu-Topper RM
Radix sort is a ___________________ integer sorting algorithm.
A. In-Place
B. Unstable
C. Comparative
D. Non-comparative Google ok
Question No:222 (Marks:1) Vu-Topper RM
We can use the optimal substructure property to devise a ____________
formulation of the edit distance problem.
A. Iterative
B. Optimum
C. Selective
D. Recursive Page 78 ok
Question No:223 (Marks:1) Vu-Topper RM
The formula for calculating the Catalan number is ____________.
For More Help Contact What’s app 03224021365
Page 85
Question No:224 (Marks:1) Vu-Topper RM
________________ belongs to Dynamic programming.
A. Heap sort
B. Merge sort
C. Edit distance Page 77 ok
D. Divide and conquer
Question No:225 (Marks:1) Vu-Topper RM
In his book ______________, Leonardo Pisano addressed the Fibonacci
sequence as well as a variety of other problems.
A. Liber fib
B. Fib abaci
C. Fibonacci
D. Liber abaci Google ok
Question No:226 (Marks:1) Vu-Topper RM
Dynamic Programming approach is usually useful in solving
__________ problems.
A. Loop
B. Array
C. Normal
D. Optimization Page 97 ok
Question No:227 (Marks:1) Vu-Topper RM
We can multiply two matrices A and B only when they are compatible
which means:
A. Number of rows and columns do not matter
B. Number of rows in A must be equal to number of rows in B
C. Number of columns in A must be equal to number of rows in
B Page 84
D. Number of columns in A must be equal to number of columns in
B
Question No:228 (Marks:1) Vu-Topper RM
If we have 6 metrices in chain matrix multiplication problem then the
number of table entries must be?
A. 12
B. 25
C. 30
D. 36 Google
For More Help Contact What’s app 03224021365
Question No:229 (Marks:1) Vu-Topper RM
_____________ algorithm based on Dynamic Programming strategy.
A. Quick Sort
B. Heap Sort Google ok
C. Binary Tree
D. Edit distance
Question No:230 (Marks:1) Vu-Topper RM
Which method is preferable for dealing with chain matrix
multiplication?
A. Graph Theory
B. Greedy Approach
C. Divide and Conquer Strategy
D. Dynamic Programming Formulation Google
Question No:231 (Marks:1) Vu-Topper RM
_______ overcomes the limitations of ________ by working as per
positional notations of numbers.
A. Bubble sort, Radix sort
B. Radix sort, Bubble sort,
C. Counting sort, Radix sort
D. Radix sort, Counting sort Page 71 ok
Visit My YouTube Channel
For More Important Notes
Channel Name = #VuTopperRM
For More Help Contact What’s app 03224021365
For More Help Contact What’s app 03224021365