 Loading, please wait...  Search here for MCQs

# Analysis of Algorithms MCQ Quiz

An Algorithm is an arrangement of steps to tackle an issue. Plan and Analysis of Algorithm are significant for planning a calculation to take care of various sorts of issues in the part of software engineering and data innovation.

A calculation is the most ideal approach to speak to the arrangement of a specific issue in an exceptionally straightforward and productive manner. In the event that we have a calculation for a particular issue, at that point we can actualize it in any programming language, implying that the calculation is free of any programming language.

The significant parts of calculation configuration incorporate making a productive calculation to take care of an issue in a proficient manner utilizing the least reality.

To tackle an issue, various methodologies can be followed. Some of them can be effective concerning time utilization, while different methodologies might be memory productive. Nonetheless, one needs to remember that both time utilization and memory use can't be improved all the while. In the event that we require a calculation to run in lesser time, we need to put resources into more memory and in the event that we require a calculation to run with lesser memory, we need to have additional time.

Calculation examination is a significant piece of computational intricacy hypothesis, which gives a hypothetical assessment of the necessary assets of a calculation to take care of a particular computational issue. Most calculations are intended to work with contributions of subjective length. Examination of calculations is the assurance of the measure of reality assets needed to execute it. Are you preparing for the next job interviews? If yes, trust me this post will help you also we'll suggest you check out a big collection for Programming Full Forms that may help you in your interview:

## 1. What is recurrence for worst case of QuickSort and what is the time complexity in Worst case?

• Recurrence is T(n) = T(n-2) + O(n) and time complexity is O(n^2)
• Recurrence is T(n) = 2T(n/2) + O(n) and time complexity is O(nLogn)
• Recurrence is T(n) = T(n-1) + O(n) and time complexity is O(n^2)
• Recurrence is T(n) = T(n/10) + T(9n/10) + O(n) and time complexity is O(nLogn)

## 2. Which of the following is not true about comparison based sorting algorithms?

• The minimum possible time complexity of a comparison based sorting algorithm is O(nLogn) for a random input array
• Heap Sort is not a comparison based sorting algorithm
• Any comparison based sorting algorithm can be made stable by using position as a criteria when two elements are compared
• Counting Sort is not a comparison based sorting algortihm

## 3. which of the following is ALWAYS TRUE?

Let w(n) and A(n) denote respectively, the worst case and average case running time of an algorithm executed on an input of size n.
•   A(n) = Theta(W(n))
•   A(n) = omega(W(n))
•   A(n) = o(W(n))
•   A(n) = O(W(n))

## 4. Given an unsorted array.

The array has this property that every element in array is at most k distance from its position in sorted array where k is a positive integer smaller than size of array. Which sorting algorithm can be easily modified for sorting this array and what is the obtainable time complexity?
• Insertion Sort with time complexity O(kn)
• Quick Sort with time complexity O(kLogk)
• Heap Sort with time complexity O(nLogk)
• Merge Sort with time complexity O(nLogk)

• N^2
• NlogN
• N(logN)^2
• N