# CS502 Lecture Wise MCQs Midterm

### CS502 Lecture Wise Solved MCQs

 Post Title CS502 Lecture Wise MCQs Midterm Book Code CS502 Degree BSIT/BSCS/Other University Virtual Univerity of Pakistan CS502 Quiz 1/ Quiz 2 / Quiz 3 CS502 Quiz 1 Mid/Final CS502 Lecture Wise MCQs Midterm Also, Read CS401 Solved MCQs Midterm Also, Read CS601 Solved MCQs Midterm

### CS502 Lecture Wise MCQs Midterm

Â In ram, each instruction involves performing some basic operation on how many values are in the machine's memory?Â  (CS502)

One

Three

Four

Two

The â€¦â€¦â€¦..is the weighted sum of running times with weights.Â  (CS502)

Average case time

Best case time

Both best case and average case

Worse case timeÂ

Merge sort is based on â€¦â€¦â€¦..(CS502)

Axis sweep

Divide and conquer

Brute force

Pian sweep

In the following code the statement â€˜cout << i,â€™ executes â€¦â€¦â€¦â€¦. Times for [int i = 1, i < = n; i++] cout<<i;Â  (CS502)

Infinite times

N+5 times

N times

Zero timesÂ

The main purpose of mathematical analysis is to measure the â€¦â€¦â€¦required by the algorithm.Â  (CS502)

SpaceÂ

Execution time and memory

Inputs & outputsÂ

Execution timeÂ

The important factors to measure the running time of the brute force 2-d maxima algorithm is.Â  (CS502)

Count the number of times an element of P is accessedÂ

Count the number of steps of the pseudo-code that is executed

All of aboveÂ

The number of comparisons that are performedÂ

Pseudocode of algorithms are to be read byâ€¦â€¦â€¦â€¦(CS502)

Computer

CompilerÂ

People

RAMÂ

If input â€˜nâ€™ is odd, then the median will be â€¦â€¦â€¦â€¦..(CS502)

(n-1)/2

(n+1)/2

N+2

n/2

Merge sort is based on â€¦â€¦â€¦..(CS502)

Axis sweep

Divide and conquer

Pian sweep

Brute forceÂ

The cubic function willâ€¦â€¦â€¦..a quadratic function.Â  (CS502)

Find

Prove

Be equal to

OvertakeÂ

Merge sort algorithm discussed in handouts containsâ€¦â€¦â€¦(CS502)

One loop only

4 loopsÂ

2 loops

3 loops

Using â€¦â€¦â€¦â€¦â€¦..algorithm, efficiency is not given much importance.Â  (CS502)

Processing

Merge sort

Greedy

Brute forceÂ

In the statement if (p[i].x & (p[i].y < p[j].y): the number of times elements of p are accessed is â€¦â€¦â€¦..(CS502)

4

1

2

3

For small values of n â€¦â€¦â€¦â€¦ the algorithm is fast enough. Â  (CS502)

Quicksort

Heapsort

Merge sort

AnyÂ

For solving the selection problem, we introduced the sieving technique due to â€¦â€¦â€¦â€¦Â  (CS502)

Eliminating rank of an elementÂ

Avoiding to sort all input data

Using brute force approachÂ

Using decrease and conquer strategyÂ

 CS502 Lecture Wise MCQs Midterm