# CS502 Quiz 1 Solution

### CS502 - Fundamentals of Algorithms MCQs

 Post Title CS502 Quiz 1 Solution 2022 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 Quiz 1 Midterm MCQs Also Read CS502 Quiz 1 Solved Also Read CS502 Lecture Wise MCQs For Midterm

## CS502 Quiz 1 Solution

There are no hard formal rules to the syntax of the â€¦â€¦â€¦â€¦code.Â  (CS502)

Pseudo

ProgrammingÂ

Assembly

Basic

â€¦â€¦â€¦..provides us more accurate results, when input values are not closer with each other.Â  (CS502)

Mode

Average

Median

MeanÂ

To find maximal points in a brute-force algorithm each point at the space is compared againstâ€¦â€¦â€¦â€¦of that space.Â  (CS502)

Most of the other pointsÂ

All other pointsÂ

One other point

Few other pointsÂ

In addition to passing in the array itself to merge sort algorithms we will pass in â€¦â€¦â€¦..other arguments which are indices.Â  (CS502)

3

2

5

4

If the time complexity of an algorithm is given by O (1), then its time complexity would be.Â  (CS502)

Polynomial

Constant

Exponential

Average

Which one of the following is the worst-case time complexity of merge sort?Â  (CS502)

O(nlogn)

O[(n^2logn]

O[nlogn^2]

O[n^2]

The words of algebra and algorithm were derived from?Â  (CS502)

Title of Al-Khwarizmi writings and his name

Â Al-Khwarizmi writingsÂ Â Â

Â Al-Khwarizmi name

Book of algebraÂ

The approach of solving geometric problems by sweeping a line across the plane is called â€¦â€¦â€¦..sweep.Â  (CS502)

Cube

Line

Plane

Box

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

ProcessingÂ

Brute forceÂ

Merge sort

Greedy

In the following code the statement cout <<jÂ  executes â€¦â€¦â€¦â€¦times. For (int i = 1, i< =n;i++) cout<<i;Â  (CS502)

Infinite timesÂ

N+5 times

Zero timesÂ

N timesÂ

In addition to passing in the array itself to merge sort algorithms, we will pass in â€¦â€¦â€¦..other arguments which are incidents.Â  (CS502)

5

2

4

3

The process of â€¦â€¦.ends when you are left with such tiny pieces remaining that it is trivial t-o solve them.Â  (CS502)

Brute - forceÂ

Axis - sweep

Divide and conquer

Plan sweepÂ

The total no of arguments passed to merge sort algorithm is â€¦â€¦â€¦â€¦â€¦â€¦.(CS502)

4

3

5

2

InÂ  2d maxima problem, a point is said to be â€¦â€¦â€¦.if it is not dominated by any other point in that space. Â  (CS502)

Maximal

Minimal

Member

JointÂ

A number of â€¦â€¦â€¦â€¦.of the pseudo code are counted to measure the running time.Â  (CS502)

Pages

Outputs

Inputs

Steps

While analysis of the brute-force maxima algorithm, on array sorted in the reverse order is the type of â€¦â€¦â€¦.code input.Â  (CS502)

Average

Best