CS502 Midterm Solved Mcqs With References by Moaaz
CS502 Midterm Solved Mcqs With References by Moaaz
CS502 Midterm Solved Mcqs With References by Moaaz
Provide by VUAnswer.com
MIDTERM EXAMINATION
Fall 2011
CS502- Fundamentals of Algorithms
MIDTERM EXAMINATION
Spring 2010
CS502- Fundamentals of Algorithms
► notation
► notation
► Flowchart Click here for detail
► Asymptotic notation
► 256MB
► 512MB
► an infinitely large (Page 10) www.VUAnswer.com
► 100GB
2
Question No: 4 ( Marks: 1 ) - Please choose one
What type of instructions Random Access Machine (RAM) can execute? Choose best answer
►n
2
► n (Page 14)
8
►n
► T(n) = T(n-1) +1
► T(n) = nT(n-1) +1
► T(n)= T(n-1) +n
► T(n)=T(n(n-1)) +1
4
► Θ (n log n)
► Items 1 and 2
► Items 1 and 3
► Items 2 and 3 (correct)
► None of these
5
MIDTERM EXAMINATION
Spring 2010
CS502- Fundamentals of Algorithms
6
Question No: 1 ( Marks: 1 ) - Please choose one
Counting sort the numbers to be sorted are in the range 1 to k where k is small.
►True (Page 57)
►False
MIDTERM EXAMINATION
Spring 2007
CS502- Fundamentals of Algorithms
►O(n)
►O( n log2 n)
►O(3)
►O( log2 ( log2 n )) www.VUAnswer.com
►O ( log2 n)
►Link list
►Structure
►Array (Page 40) www.VUAnswer.com
►None of above
Infinite
Continuous
Constant (Page 10)
Variable
Question No: 1 ( Marks: 1 ) - Please choose one
If the indices passed to merge sort algorithm are not equal, the algorithm may return immediately.
True
False (Page 28)
Question No: 1 ( Marks: 1 ) - Please choose one
Brute-force algorithm uses no intelligence in pruning out decisions.
8
True (Page 18)
False
True (Page 24)
False
Question No: 1 ( Marks: 1 ) - Please choose one
For small values of n, any algorithm is fast enough. Running time does become an issue when n gets large.
True
False
True
False (Page 27) [Divide and Conquer]
Member
Minimal
Maximal (Page 11) www.VUAnswer.com
Joint
9
True
False (Page 7)
Results
Variables
Size
Growth rates (Page 23)
10
True (Page 28)
False
n
2n
n+1
n2 (Page 23)
Macro
Micro
Both Macro & Micro (Page 8)
Normal
True
False (Page 18)
11
Consider the following Algorithm: Fun(n){ if (n=1) return 1 else return (n * Fun(n-1)) } Recurrence for the
above algorithm is:
nT(n-1)+1
2T(n-1)+1
T(n-1)+cn
T(n-1)+1
Memory
Running Time
Memory and Running Time (Page 9)
Energy
Two
Lower
Upper (Page 25)
Both lower & upper
1
2 (Page 16)
3
4
12
Z
X&Y
Two
Some
Most
All (Page 18)
Normal
Least (Page 23)
Most
All
One
Lower
Upper
Both lower & upper (Page 25) rep www.VUAnswer.com
Array
Queue
Stack (Page 18)
Tree
13
Quiz No.1 (2012)
Question No: 1 of 10 ( Marks: 1 ) - Please choose one
The number of nodes in a complete binary tree of height h is
arithmetic
geometric
linear (Page 37)
orthogonal
pivot
Sieve
smaller sub problems (Page 34)
Selection
15
CS502 - Fundamentals of Algorithms
Quiz No.1 12-11-2012
linear
16
arithmetic
geometric (Page 37)
exponent
(n / 2)+n elements
(n / 2) elements (Page 37)
n / 4 elements
2 n elements
17
variables
functions
18
O (n+k)
O n^3
Merger Sort
Quick Sort (Page 54)
Continuation Sort
Bubble Sort
If duplicate elements remain in the same relative position after sorting (Page 54)
One array is used
More than one arrays are required
Duplicating elements not handled
19
More than one array
No Additional Array (Page 54)
None of the above
upper
lower (Page 39)
average
log n
Question No: 1 of 10 ( Marks: 1 ) - Please choose one
Counting sort has time complexity:
No of inputs
Arrangement of elements in array
Size o elements
Pivot elements (Page 49)
Bubble sort
Insertion sort
Both of above (Page 54)
20
Question No: 1 of 10 ( Marks: 1 ) - Please choose one
One Example of in place but not stable sort is
Large
Medium
Small Click here for detail
Not Known
21
CS501 - Quiz No.2 (Spring 2013)
Question No: 1 of 10 ( Marks: 1 ) - Please choose one
A point p in 2-dimensional space is usually given by its integer coordinate(s)____________
p.x only
p.y only
p.x & p.z
p.x & p.y (Page 10)
Less than
Equal to or Less than (Page 25)
Equal or Greater than
Greater than
True
22
False (Page 10)
Searching
Sorting (Page )
Both Searching & Sorting
Graphing
Very easy
Usually considered difficult (Page 31)
True
23
False (Page 7)
x<y
x>y
x=y
All of the above (Page 39)
True (Page 9)
False
True
False (Page 34) www.VUAnswer.com
In increasing order
In decreasing order
According to Pivot (Page 35)
Randomly
24
Question No: 1 of 10 ( Marks: 1 ) - Please choose one
In pseudo code, the level of details depends on intended audience of the algorithm.
Small
Large
Equal (Page 28)
Not Equal
25