Can’t find an answer?

Can’t find an answer?

Ask us to get the answer

  • This forum is empty.

Which one of the following is most appropriate description of “algorithm”
1. Source code
2. Executable image
3. Object file
4. Statements laying down a step-by-step execution of the programme

Write an algorithm to convert temperature from Celsius to Fahrenheit

Which of the following is true about merge sort?
(A) Merge Sort works better than quick sort if data is accessed from slow sequential memory.
(B) Merge Sort is stable sort by nature
(C) Merge sort outperforms heap sort in most of the practical situations.
(D) All of the above.

The number of elements that can be sorted in \Theta(logn) time using heap sort is

(A) \Theta(1)(B) \Theta(\sqrt{logn})(C) \Theta(Log n/(Log Log n))(d) \Theta(Log n) 

(A) A
(B) B
(C) C
(D) D

Given an array where numbers are in range from 1 to n6, which sorting algorithm can be used to sort these number in linear time?
(A) Not possible to sort in linear time
(B) Radix Sort
(C) Counting Sort
(D) Quick Sort

In quick sort, for sorting n elements, the (n/4)th smallest element is selected as pivot using an O(n) time algorithm. What is the worst case time complexity of the quick sort?

(A) \theta(n)
(B) \theta(nLogn)
(C) \theta(n^2)
(D) \theta(n^2 log n)
(A) A
(B) B
(C) C
(D) D

Consider the Quicksort algorithm. Suppose there is a procedure for finding a pivot element which splits the list into two sub-lists each of which contains at least one-fifth of the elements. Let T(n) be the number of comparisons required to sort n elements. Then
(A) T(n) <= 2T(n/5) + n
(B) T(n) <= T(n/5) + T(4n/5) + n
(C) T(n) <= 2T(4n/5) + n
(D) T(n) <= 2T(n/2) + n

Which of the following sorting algorithms has the lowest worst-case complexity?
(A) Merge Sort
(B) Bubble Sort
(C) Quick Sort
(D) Selection Sort

Which sorting algorithms is most efficient to sort string consisting of ASCII characters?
(A) Quick sort
(B) Heap sort
(C) Merge sort
(D) Counting sort

Which of the following sorting algorithms in its typical implementation gives best performance when applied on an array which is sorted or almost sorted (maximum 1 or two elements are misplaced).
(A) Quick Sort
(B) Heap Sort
(C) Merge Sort
(D) Insertion Sort

Viewing 15 topics - 1 through 15 (of 95 total)

1 2 3 5 6 7
  • You must be logged in to create new topics.