0% found this document useful (0 votes)
49 views

A. B. C. D.: View Answer Discuss Too Difficult! Search Google

The document discusses various computer science concepts including data structures, algorithms and their time complexities, programming languages, and sorting techniques. Specifically, it provides answers to multiple choice questions about AVL trees having better time complexity than binary search trees for various operations, functions for handling exceptions, the state of a stack after various push and pop operations, the number of spanning trees that can be drawn with five labeled vertices, combining sorted lists using a heap, models used in object modeling technique, an example of dictionary-based coding, conditions for an algorithm to find an optimal solution, evaluating a postfix expression, pointers changing during queue insertion, techniques for proving recursive functions, properties of B-trees, comparisons needed to find min and max of arrays,

Uploaded by

phani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views

A. B. C. D.: View Answer Discuss Too Difficult! Search Google

The document discusses various computer science concepts including data structures, algorithms and their time complexities, programming languages, and sorting techniques. Specifically, it provides answers to multiple choice questions about AVL trees having better time complexity than binary search trees for various operations, functions for handling exceptions, the state of a stack after various push and pop operations, the number of spanning trees that can be drawn with five labeled vertices, combining sorted lists using a heap, models used in object modeling technique, an example of dictionary-based coding, conditions for an algorithm to find an optimal solution, evaluating a postfix expression, pointers changing during queue insertion, techniques for proving recursive functions, properties of B-trees, comparisons needed to find min and max of arrays,

Uploaded by

phani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

1.

The worst case time complexity of AVL tree is better in comparison to binary search tree for

a. Search and Insert Operations

b. Search and Delete Operations

c. Insert and Delete Operations

d. Search, Insert and Delete Operations

View Answer Report Discuss Too Difficult! Search Google

Answer: (d).Search, Insert and Delete Operations)

2. Which of the following are two special functions that are meant for handling exception, that occur during excep

a. Void terminate ( ) and Void unexpected ( )

b. Non void terminate ( ) and void unexpected ( )

c. Void terminate ( ) and non void unexpected ( )

d. Non void terminate ( ) and non void unexpected ( )

View Answer Report Discuss Too Difficult! Search Google

Answer: (a).Void terminate ( ) and Void unexpected ( ))

3. Given an empty stack, after performing push (1), push (2), Pop, push (3), push (4), Pop, Pop, push(5), Pop, w
of the stack ?

a. 4

b. 3

c. 2

d. 1

View Answer Report Discuss Too Difficult! Search Google

Answer: (d).1)
4. The total number of spanning trees that can be drawn using five labelled vertices is:

a. 125

b. 64

c. 36

d. 16

View Answer Report Discuss Too Difficult! Search Google

Answer: (a).125)

5. Suppose there are logn sorted lists of n logn elements each. The time complexity of producing a sorted list of
heap data structure)

a. O (n log logn)

b. θ(n logn)

c. Ω(n logn)

d. Ω(n3/2)

View Answer Report Discuss Too Difficult! Search Google

Answer: (a).O (n log logn) )

6. The Object Modelling Technique (OMT) uses the following three kinds of model to describe a system 

a. Class Model, Object Model and Analysis Model

b. Object Model, Dynamic Model, and Functional Model

c. Class Model, Dynamic Model and Functional Model

d. Object Model, Analysis Model and Dynamic Model

View Answer Report Discuss Too Difficult! Search Google


Answer: (b).Object Model, Dynamic Model, and Functional Model)

7. An example of a dictionary-based coding technique is 

a. Run-length coding

b. Huffman coding

c. Predictive coding

d. LZW coding

View Answer Report Discuss Too Difficult! Search Google

Answer: (d).LZW coding)

8. A algorithm is guaranteed to find an optimal solution if 

a. h' is always 0

b. g is always 1

c. h' never overestimates h

d. h' never underestimates h

View Answer Report Discuss Too Difficult! Search Google

Answer: (c).h' never overestimates h)

9. What is the value of the postfix expression ?


abc d + - * (where a = 8 , b = 4 , c = 2 and d = 5)

a. -3/8

b. -8/3

c. 24

d. -24
View Answer Report Discuss Too Difficult! Search Google

Answer: (d).-24)

10. If the queue is implemented with a linked list, keeping track of a front pointer and a rear pointer, which of these
during an insertion into a non-empty queue?

a. Neither of the pointers change

b. Only front pointer changes

c. Only rear pointer changes

d. Both of the pointers changes

View Answer Report Discuss Too Difficult! Search Google

Answer: (c).Only rear pointer changes)

11. ___________ is often used to prove the correctness of a recursive function.

a. Diagonalization

b. Communitivity

c. Mathematical Induction

d. Matrix Multiplication

View Answer Report Discuss Too Difficult! Search Google

Answer: (c).Mathematical Induction)

12. For any B-tree of minimum degree   t   ≥  2, every node other than the root must have atleast keys and every n
____ keys. 

a. t -1, 2t + 1

b. t + 1, 2t + 1

c. t-1, 2t-1

d. t+ 1, 2t-1
View Answer Report Discuss Too Difficult! Search Google

Answer: (c).t-1, 2t-1)

13. Given two sorted list of size 'm' and 'n' respectively. The number of comparison needed in the worst case by th
will be 

a. mxn

b. max (m, n)

c. min (m, n)

d. m +n-1

View Answer Report Discuss Too Difficult! Search Google

Answer: (d).m +n-1)

14. Match the following with respect to programming languages

  a. Structured Language  i.   JAVA

  b. Non-structured Language   ii. BASIC

  c. Object Oriented  Programming Language  iii.  PASCAL

  D. Interpreted  Programming Language  iv. FORTRAN

codes:
abcd

a. iii  iv   i   ii

b. iv   iii   ii   i

c. ii   iv   i   iii

d. ii   iii   iv   i

View Answer Report Discuss Too Difficult! Search Google

Answer: (a).iii  iv   i   ii)


15. The compiler converts all operands up to the type of the largest operand is called

a. Type Promotion

b. Type Evaluation

c. Type Conversion

d. Type Declaration

View Answer Report Discuss Too Difficult! Search Google

Answer: (a).Type Promotion)

16. _____________ comparisons  are necessary in the worst case  to find both the maximum and minimum of n n

a. 2n-2

b. n + floor(log n) -2

c. floor(3n/2) -2

d. 2 log n -2

View Answer Report Discuss Too Difficult! Search Google

Answer: (c).floor(3n/2) -2)

17. Let A and B be two n x n matrices,The efficient algorithm to multiply the two matrices , has the time complexity

a. O(n^3)

b. O(n^2.81)

c. O(n^2.67)

d. O(n^2)

View Answer Report Discuss Too Difficult! Search Google

Answer: (b).O(n^2.81))
18. Assuming there are n keys and each key is in the range [0, m - 1]. The run time of bucket sort is

a. O(n)

b. O(n log n)

c. O(n log m)

d. O(n+n)

View Answer Report Discuss Too Difficult! Search Google

Answer: (d).O(n+n))

19. You have to sort a list L, consisting of a sorted list followed by a few 'random' elements. Which of the following
most suitable for such a task?

a. Bubble sort

b. Selection sort

c. Quick sort

d. Insertion sort

View Answer Report Discuss Too Difficult! Search Google

Answer: (d).Insertion sort)

20. A full binary tree with n leaves contains

a. n nodes

b. log2 n nodes

c. 2n-1 nodes

d. 2^n nodes

View Answer Report Discuss Too Difficult! Search Google


Answer: (c).2n-1 nodes)

You might also like