Skip to main content

Important Questions of Data Structure and Algorithm (DSA)

 .

1. What is Data structure? Explain different operations to be performed on data structure.

2. Define stack as ADT. Convert P+Q-(R*S/T+U) - V*W into infix expression to postfix.

3. Define Queue. Explain its type with example.

4.  Difference between stack and Queue.

5. Difference between Linear Queue and circular Queue.

6. Write an algorithm to enqueue and dequeue data element in a circular queue.                             

7. Define Linked List. Explain its type. How does double linked List is different from circular linked List.

8. What is recursion and recursive function? write a recursive function to compute Fibonacci number.

9. What is an AVL tree ? Create an  AVL tree from the following data:
    18, 12, 14, 8, 85, 25, 31, 24, 27

10. Define B-tree? How to insertion and deletions of elements can be done in a B-tree.

11. Create an B-tree from the following Data: 
    3,1,4,85,9,2,6,8,7,11,13,19, 2,23

12. What is Quick Quick sort? Implement the quick sort to sort the following data items: 
    12, 1, 14,7,2, 10, 4, 7, 22, 6, 15.

13. What is insertion sort? Trace and sort the following data using insertion sort 

    90, 57, 80, 10, 22, 21, 45, 9, 78

14. What is external sorting? Explain heap sort algorithm and trace it to sort the data:
     82, 90, 10, 12, 15, 77, 55, 23, 25, 32.

15. Define Hash Function. Describe the types of collision revolution techniques with suitable example.

16. How does collision occur during hashing? Explain any bro hashing function.

18. Define graph and tree data structure. Explain breadth first traversal and depth first traversal with example.

18. Define graph as ADT. Explain the different way to represent a graph. For the following graph use Prim's algorithm to find a minimum spanning tree stating from the node A.

19. What are deterministic and non-deterministic algorithms? Explain the use of Big oh notation to measure the complexity of the algorithm with example.

20. What do you mean by Huffman Algorithm? Explain with example. Construct the B tree of order 5 using following data: 
    20, 10, 26, 55, 80, 11, 9, 60, 67, 55, 22, 76, 56, 45, 34, 100, 150.

21. What do you mean by MST? Explain kruskal's algorithm with example

22. What are depth and degree of a node in a tree? perform pre-order, in-order and post-order traversal            of the following tree:

Comments

Popular posts from this blog

Database

 . A Database is a repository for collection of related data or facts. A database contains a collection of related items or facts arranged in a specific structure. The most obvious example of a non computerized database is a telephone directory. Telephone companies now use an electronic database program to produce their printed phone books. Sometimes, we see a specialized phone book that is sorted not only by last name, but by other items such as phone number or street address. These books are easy to produce because the telephone company's electronic database can sort and organize the data in many different ways. Database programs can also sort lists of data, arranging them in alphabetical, numeric, or chronological order and can search or query data with different conditions. Features of Database  The data in a database should have following features Shared : Data in a database is sharing among different user and application. Validity :  Data should be correct with resp...

Operators and Variables in PHP

 . Operator  An Operator is a symbol that perform certain mathematical and logical operation on operator. It is define as an action upon the two possible values. Operators are used to program operation on the variables and values.  PHP Operators are of following types: Arithmetic Operator Assignment Operator  Logical Operator Comparison Operator Conditional Operator Increment / Decrement Operator Concatenation Operator 1. Arithmetic Operator Arithmetic operator are used to preform arithmetic operation on numeric values. 2. Assignment Operator An assignment operator is mainly responsible for assigning a value to a variable in a program. It is used to value to the variable.  Assignment Same As Description x = y x = y left operand and right operand are same. x + = y X = X + y left operand get added value of right operand. x - = y ...

Introduction of Computer

.  A computer is an electronic device. It take input and store the data in memory and performing the function to produce accurate result in output device. It is used to type document, send email, play game, browse the web and entertainment.   Characteristics of computer  1 . High speed  Computer is very fast device. It is capable of performing calculation of very large amount of data. The computer has unit of speed in microsecond, nanosecond and even in picosecond. The computer is capable of performing millions of tasks per second. 2. Accuracy  The computer produces highly accurate and reliable result.  It does not make any kind of mistake in calculating. The calculation are 100% error free. The computers perform accurate 'n' number of times. 3. Storage capability A computer has much more storage capability. It can store large amount of data. It can store any type of data such as image, video, text document, audio and many more. 4. Diligence Diligence ...