Users Also Read

MCQ's Search Engine

Electrical Engineering

Mechanical Engineering

Civil Engineering

Automobile Engineering

Chemical Engineering

Computer Engineering

Electronics Engineering

Medical Science Engg

Q1. | The running time of an algorithm T(n),where 'n' is the input size, of a recursive algorithm is given as follows.is given by T(n) =c + T(n - 1), if n > 1 d, if n ≤ 1 The order of this algorithm is |

A. | n [Correct Answer] |

B. | n+1 [Wrong Answer] |

C. | n-1 [Wrong Answer] |

D. | n*1 [Wrong Answer] |

View Answer
Explanation:-
Answer : ADiscuss it below :!! OOPS Login [Click here] is required to post your answer/resultHelp other students, write article, leave your comments |

**Also Read Similar Questions Below :**

⇒ Which of the following need not to be a binary tree ?

Heap

B-Tree

AVL-Tree

Search tree

⇒ Which of the following sorting methods will be the best if number of swappings done, is the only measure of efficienty?

Quick sort

Bubble sort

Selection sort

Insertion sort

⇒ You are asked to sort 15 randomly generated numbers. You should prefer

Quick sort

Bubble sort

Selection sort

Insertion sort

⇒ Choose the correct statements

External sorting needs auxilary storage

External sorting is used if the number of items to be sorted is very large.

Both (a) and (b)

Internal sorting is used if the number of items to be sorted is very large.

⇒ Average successful search time for sequential search on 'n' items is

n/2

(n+1)/2

(n-1)/2

None of these

⇒ Which of the following abstract data types can be used to represent a many to many relation?

Plex

Graph

Both (a) and (b)

Tree

⇒ The minimum number of edges in a connected cyclic graph on n vertices is

n

n+1

n-1

none of the above

⇒ An array of n numbers is given, where n is an even number. The maximum as well as the minimum of these n numbers needs to be determined. Which of the following is TRUE about the number of comparisons

At most 1.5n-2 comparisons are needed.

At least nlog2n comparisons are needed.

At least 2n-c comparisons, for some constant c, are needed.

None of the above

⇒ The data structure required to check whether an expression contains balanced parenthesis is

Tree

Stack

Array

Queue

⇒ Which of the following types of expressions does not require precedence rule when evaluated?

Prefix expression

More than one of these

Full parenthesized infix expression

Partially parenthesized infix expression

⇒ A matrix "a" is called lower triangular if and only if for all j > ai j = 0. If such a matrix is to be sorted in a one dimensional array, A then ai j could be mapped to which of the following index of

i + j

i (i + 1) + j

1/2 * i (i + 1) j

none of these

⇒ Using Pop (S1,Item) ,Push(S1, Item), Getlist(Item), Pop(S2,Item), and the variables S1,S2(stacks with Top1 and Top2) and Item and given the input file: A,B,C,D,E,F Which stack are possible?

No possible stacks with A,B,C,D,E and F

All possible stacks with A,B,C,D,E and F

Twice as many stacks as can be produced with S1 alone

Exact and only those stacks which can be produced with S1 alone

⇒ The way a card game player arranges his cards as he picks them up one by one, is an example of

merge sort

bubble sort

selection sort

insertion sort

⇒ In previous question, the average access time will be

248 units

258 units

268 units

278 units

⇒ If memory for the run-time stack is only 150 cells(words), how big can N be in Factorial(N) before encounterring stack overflow?

13

26

31

45

⇒ Which of the following algorithms exhibits the unnatural behavior that, minimum number of comparisons are needed if the list to be sorted is in the reverse sorted order and maximum number of compariso

heap sort

Radix sort

Binary insertion sort

There can't be any such sorting method

⇒ Stack can't be used to

Implement recursion

Evaluate an arithmetic expression in postfix form

Allocate resources(like CPU)by the operating system

Convert a given arithmetic expression in infix form to its evaluate postfix form

⇒ The postfix equivalent of the prefix * + a b - c d is

ab+cd-*

ab + cd * -

ab + - cd *

ab cd + - *

⇒ The number of swappings needed to sort the numbers 8, 22, 7, 9, 31, 19, 5, 13 in ascending order, using bubble sort is

10

12

14

16

⇒ Which of the following is false ?

A binary search begins with the middle element in the array

A binary search continues having the array either until a match is found or until there are no more elements to search

For a binary search to work, the data in the array must be arranged in either alphabetical or numerical order

If the search argument is greater than the value located in the middle of the binary, the binary search continues in the upper half of the array

⇒ Number of "ADD" and "REMOVE" operations required to access n/2th elements of a queue of "n" elements so that the original queue remain the same after the access is (take help of another queue.)

2*n

4*n

8*n

8*n-1

⇒ Let m, n be positive integers. Define Q (m, n) as Q (m, n) = 0, if m>n Then Q (m, 3) is (a div b, gives the quotient when a is divided by b)

3 x p

a constant

p x (m div 3)

p x (m mod 3)

⇒ An algorithm is made up of 2 modules Ml and M2. If order of M1 is f(n) and M2 is g(n) then the order of the algorithm is

f (n) + g (n)

f (n) x g (n )

min (f (n) ,g (n) )

max (f (n) ,g (n))

⇒ For merging two sorted lists of sizes m and n into a sorted list of size m + n, we require comparisons of

O(m)

O(n)

O(m+n)

O(log(m) + log(n))

⇒ Which of the following sorting method is stable ?

Shell sort

Heap sort

Binary insertion sort

Straight insertion sort

⇒ As part of the maintenance work, you are entrusted with the work of rearranging the library books in a shelf in proper order, at the end of each day. The ideal choice will be

heap sort

bubble sort

selection sort

insertion sort

⇒ Which of the following sorting algorithm has the worst time complexity of n log(n)?

Heap sort

Quick sort

Selection sort

Insertion sort

⇒ Which of the following data structure may give overflow error,even though the current number of element in it is less than its size?

Simple queue

Circular queue

Priority Queues

None of these

⇒ The time complexity of linear search algorithm over an array of n elements is

O(n)

0 (n2)

O (log2 n)

O(n log2 n)

⇒ Traversing a binary tree first root and then left and right subtrees called _______traversal.

inorder

preorder

postorder

none of these