Saturday 4 May 2013

Solved CS502 Quiz No.1

Continuation sort is suitable to sort the elements in range 1 to k
K is Large
K is not known
K may be small or large
K is small

In stable sorting algorithm.
If duplicate elements remain in the same relative position after sorting
One array is used
More than one arrays are required
Duplicating elements not handled

Which may be a stable sort?
Merger
Insertion
Both above
None of the above

An in place sorting algorithm is one that uses ___ arrays for storage
Two dimensional arrays
More than one array
No Additional Array
None of the above

Continuing sort has time complexity of ?
O(n)
O(n+k)
O(nlogn)
O(k)

We do sorting to,
keep elements in random positions
keep the algorithm run in linear order
keep the algorithm run in (log n) order
keep elements in increasing or decreasing order


In Sieve Technique we donot know which item is of interest

True
False
A (an) _________ is a left-complete binary tree that conforms to the
heap order
heap
binary tree
binary search tree
array
27. The sieve technique works in ___________ as follows
phases
numbers
integers
routines

For the sieve technique we solve the problem,
recursively
mathematically
precisely
accurately
29. For the heap sort, access to nodes involves simple _______________
operations.
arithmetic
binary
algebraic
logarithmic



The analysis of Selection algorithm shows the total running time is
indeed ________in n,\
arithmetic
geometric
linear
orthogonal

For the heap sort, access to nodes involves simple _______________
operations.
Select correct option:
arithmetic
binary
algebraic
logarithmic

Sieve Technique applies to problems where we are interested in finding a
single item from a larger set of _____________
Select correct option:
n items
phases
pointers
constant

Question # 9 of 10 ( Start time: 07:45:36 AM ) Total Marks: 1
In Sieve Technique we do not know which item is of interest
Select correct option:
True
False

How much time merge sort takes for an array of numbers?
Select correct option:
T(n^2)
T(n)
T( log n)
T(n log n)

For the heap sort we store the tree nodes in
Select correct option:
level-order traversal
in-order traversal
pre-order traversal
post-order traversal


Sorting is one of the few problems where provable ________ bonds exits on
how fast we can sort,
Select correct option:
upper
lower
average
log n

single item from a larger set of _____________
Select correct option:
n items
phases
pointers
constant

A heap is a left-complete binary tree that conforms to the ___________
Select correct option:
increasing order only
decreasing order only
heap order
(log n) order

In the analysis of Selection algorithm, we make a number of passes, in fact it could be as many as,
Select correct option:
T(n)
T(n / 2)
log n
n / 2 + n / 4

The reason for introducing Sieve Technique algorithm is that it illustrates a
very important special case of,
Select correct option:
divide-and-conquer
decrease and conquer
greedy nature
2-dimension Maxima

The sieve technique works in ___________ as follows
Select correct option:
phases
numbers
integers
routines
For the Sieve Technique we take time
Select correct option:
T(nk)
T(n / 3)
n^2
n/3

In the analysis of Selection algorithm, we eliminate a constant fraction of the
array with each phase; we get the convergent _______________ series in the
analysis,
linear
arithmetic
geometric
exponent

Analysis of Selection algorithm ends up with,
Select correct option:
T(n)
T(1 / 1 + n)
T(n / 2)
T((n / 2) + n)

Quiz Start Time: 07:23 PM 
Time Left 90
sec(s) 
Question # 1 of 10 ( Start time: 07:24:03 PM ) Total M a r k s: 1
In in-place sorting algorithm is one that uses arrays for storage :
Select correct option:
An additional array
No additioanal array
Both of above may be true according to algorithm
More than 3 arrays of one dimension.

Time Left 89
sec(s) 
Question # 2 of 10 ( Start time: 07:25:20 PM ) Total M a r k s: 1
Which sorting algorithn is faster :
Select correct option:
O(n^2)
O(nlogn)
O(n+k)
O(n^3)

In stable sorting algorithm:
Select correct option:
One array is used
In whcih duplicating elements are not handled.
More then one arrays are required.
Duplicating elements remain in same relative posistion after sorting.

Counting sort has time complexity:
Select correct option:
O(n)
O(n+k)
O(k)
O(nlogn)



Counting sort is suitable to sort the elements in range 1 to k:
Select correct option:
K is large
K is small
K may be large or small
None



Memorization is :
Select correct option:
To store previous results for further use.
To avoid unnecessary repetitions by writing down the results of recursive calls and looking them again if needed later
To make the process accurate.
None of the above


The running time of quick sort depends heavily on the selection of
Select correct option:
No of inputs
Arrangement of elements in array
Size o elements
Pivot elementsWhich may be stable sort:
Select correct option:
Bubble sort
Insertion sort
Both of aboveIn Quick sort algorithm, constants hidden in T(n lg n) are
Select correct option:
Large
Medium
Not known
small


Quick sort is
Select correct option:
Stable and In place
Not stable but in place
Stable and not in place
Some time in place and send some time stable



For the Sieve Technique we take time
T(nk)
T(n / 3)
n^2
n/3

The sieve technique is a special case, where the number of sub problems is just
Select correct option:
5
Many
1
Few

--
Need Your Comments.....!

-- 

For University of Pakistan Study Material Sharing, Discussion, etc, Come and join us at http://4e542a34.linkbucks.com
You received this message because you are subscribed to the Google
Groups "Study" group.
To post to this group, send email to http://ca13054d.tinylinks.co
For more options, visit this group at
http://004bbb67.any.gs

No comments:

Post a Comment

Note: only a member of this blog may post a comment.