Complexity Theory Questions for Mphasis

Question 1

Time: 00:00:00
A code with θ(n) and θ(n^2). Which code will execute faster for a code of size J?

θ(n)

θ(n)

θ(n2)

θ(n2)

Cant be said as size of K is unknown

Cant be said as size of K is unknown

Both will be equal

Both will be equal

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 2

Time: 00:00:00
In regards to time complexity which will perform better ω(n^4) or O(n^3)?

ω(n^4)

ω(n^4)

O(n^3)

O(n^3)

Both Equally

Both Equally

Cant be said

Cant be said

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 3

Time: 00:00:00
In case of the worst timing, which might be the worst to implement in sorting algorithm?

Quick

Quick

Merge

Merge

Tim

Tim

Heap

Heap

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 4

Time: 00:00:00
The time required to insert in the Queue is?

O(n)

O(n)

O(n^2)

O(n^2)

O(1)

O(1)

O(log n)

O(log n)

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 5

Time: 00:00:00
Which of the following has the quickest average time complexity?

Quick

Quick

Radix

Radix

Bubble

Bubble

Heap

Heap

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 6

Time: 00:00:00
There are 2 buildings and on each's window, a flower pot is kept. Ravi's mother tells him to multiply each cell/window to the other and store in a matrix? What would be time complexity if he writes a code to do so?

Omega(n)

Omega(n)

Omega(n^2)

Omega(n^2)

Theta (n)

Theta (n)

Theta (n^2)

Theta (n^2)

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 7

Time: 00:00:00
There are 2 buildings and on each's window, a flower pot is kept. Ravi's mother tells him to add each cell/window to the other and store in a matrix? What would be time complexity if he writes a code to do so?

Theta(n)

Theta(n)

Theta( log n)

Theta( log n)

Theta(n^2)

Theta(n^2)

Theta(n log n)

Theta(n log n)

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Question 8

Time: 00:00:00
What is space complexity of the program?

Amount of hard disk space required to store the program.

Amount of hard disk space required to store the program.

Amount of hard disk space required to compile the program.

Amount of hard disk space required to compile the program.

Amount of memory required by the program to run.

Amount of memory required by the program to run.

Amount of memory required by the program to compile.

Amount of memory required by the program to compile.

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

["0","40","60","80","100"]
["Need more practice! \r\n \r\n","Keep trying! \r\n \r\n","Not bad! \r\n \r\n","Good work! \r\n \r\n","Perfect! \r\n \r\n"]