2
1. What is data structure? Explain linear and non-linear data structure with example. a. Give the difference b etween (i) Linear and Non Linear Data Structures. (ii) Primitive and Non-Primitive Data Structures 2. What does abstract data t ype mean s? 3. List various fundamental file organization techniques and explain each in brief. / What is File Structure? Explain Indexed Sequential File Structure in detail. 4. Define Following terms a. Time and space complexity of an algorithm  b. File, Field, Record, Database, Key 5. Define Algorithm. Write an algorithm to multiply two matrices. Also Perform Time Analysis for the same. 6. What is sparse matrix? Explain memory representation of sparse matrix. 7. What are the applications of the stack? 8. Write an algorithm to convert infix expression into postfix expression with parenthesis. 9. Write an algorithm for evaluation of postfix expression and evaluation the following expression showing every status of stack in tabular form. (i) 5 4 6 + * 4 9 3 / + * (ii) 7 5 2 + * 4 1 1 + / - 10. Trace the conversion of infix to postfix form in ta bular form. (i) (A + B * C / D - E + F / G / ( H + I ) ) (ii) ( A + B ) * C + D / ( B + A * C ) + D 11. Evaluate following prefix expression. +*AB-C+C*BA (A= 4, B=8, C=12) 12. Consider the following arithmetic expression P, written in postfix notation. Translate it in infix notation and evaluate. P: 12, 7, 3, -, /, 2, 1, 5, +, *, + 13. Convert following Infix expression into Postfix and Prefix expression . a    b / c * d + e * f / g 14. Transform the following expression to postfix (reverse polish)and evaluate postfix expression by assuming A=1,B=2,C=3,D=4,E=6,F=6,G=1,I=3 and J=3 A +B-C*D/E +F$G/(I+J) 15. What is recursion? What care should be taken in writing recursive function? Give example of any one recursive function/Write a C program for GCD using recursion 16. What is Tower of Hanoi? Explain it with n=3. 17. Differentiate a. Stack & queue.  b. Simple Queue and Circular Queue . 18. Write an algorithm for a. PUSH, POP and CHANGE Operations on Stack  b. Circular queue that insert an element at rear end. c. Double Ended Queue that insert an element at  front end & rear  end. d. Delete operation into a Circular Queue 19. Write a short note on a. Storage representation of 2 Dimensional array.  b. Dequeue c. Priority Queue 20. Consider the following queue, where queue is a circular queue having 6 memory cells. Front=2, Rear=4 Queue: _, A, C, D, _, _ Describe queue as following operation take place: F is added to the queue Two letters are deleted R is added to the queue S is added to the queue One letter is deleted

DFS_QBANK

  • Upload
    krupal5

  • View
    222

  • Download
    0

Embed Size (px)

Citation preview

Page 1: DFS_QBANK

8/12/2019 DFS_QBANK

http://slidepdf.com/reader/full/dfsqbank 1/1

1.  What is data structure? Explain linear and non-linear data structure with example.a.  Give the difference between

(i)  Linear and Non Linear Data Structures.(ii)  Primitive and Non-Primitive Data Structures

2.  What does abstract data type means?3.  List various fundamental file organization techniques and explain each in brief. / What is File Structure?

Explain Indexed Sequential File Structure in detail.4.  Define Following terms

a. 

Time and space complexity of an algorithm b.  File, Field, Record, Database, Key5.  Define Algorithm. Write an algorithm to multiply two matrices. Also Perform Time Analysis for the same.6.  What is sparse matrix? Explain memory representation of sparse matrix.7.  What are the applications of the stack?

8.  Write an algorithm to convert infix expression into postfix expression with parenthesis.9.  Write an algorithm for evaluation of postfix expression and evaluation the following expression showing

every status of stack in tabular form.(i)  5 4 6 + * 4 9 3 / + * (ii) 7 5 2 + * 4 1 1 + / -

10. Trace the conversion of infix to postfix form in tabular form.(i)  (A + B * C / D - E + F / G / ( H + I ) )(ii)  ( A + B ) * C + D / ( B + A * C ) + D

11. Evaluate following prefix expression.+*AB-C+C*BA (A= 4, B=8, C=12)

12. Consider the following arithmetic expression P, written in postfix notation. Translate it in infix notation andevaluate.

P: 12, 7, 3, -, /, 2, 1, 5, +, *, +13. Convert following Infix expression into Postfix and Prefix expression.

a  –  b / c * d + e * f / g

14. Transform the following expression to postfix (reverse polish)and evaluate postfix expression by assumingA=1,B=2,C=3,D=4,E=6,F=6,G=1,I=3 and J=3

A +B-C*D/E +F$G/(I+J)

15. What is recursion? What care should be taken in writing recursive function? Give example of any onerecursive function/Write a C program for GCD using recursion

16. What is Tower of Hanoi? Explain it with n=3.

17. Differentiatea.  Stack & queue. b.  Simple Queue and Circular Queue.

18. Write an algorithm fora.  PUSH, POP and CHANGE Operations on Stack b.  Circular queue that insert an element at rear end.c.  Double Ended Queue that insert an element at front end & rear  end.d.  Delete operation into a Circular Queue

19. Write a short note ona.  Storage representation of 2 Dimensional array. b.  Dequeuec.  Priority Queue

20. Consider the following queue, where queue is a circular queue having 6 memory cells. Front=2, Rear=4Queue: _, A, C, D, _, _Describe queue as following operation take place:F is added to the queueTwo letters are deletedR is added to the queue

S is added to the queueOne letter is deleted