Most recently Data Structures Interview Questions and Answers

11. List the basic operations carried out in a linked list
The basic operations carried out in a linked list include:
• Creation of a list
• Insertion of a node
• Deletion of a node
• Modification of a node
• Traversal of the list

12. List out the advantages of using a linked list
• It is not necessary to specify the number of elements in a linked list during its declaration
• Linked list can grow and shrink in size depending upon the insertion and deletion that occurs in the list
• Insertions and deletions at any place in a list can be handled easily and efficiently
• A linked list does not waste any memory space

13. List out the disadvantages of using a linked list
• Searching a particular element in a list is difficult and time consuming
• A linked list will use more storage space than an array to store the same number of elements

14. List out the applications of a linked list
Some of the important applications of linked lists are manipulation of polynomials, sparse matrices, stacks and queues.

16. Define a stack
Stack is an ordered collection of elements in which insertions and deletions are restricted to one end. The end from which elements are added and/or removed is referred to as top of the stack. Stacks are also referred as piles, push-down lists and last-in-first-out (LIFO) lists.

17. List out the basic operations that can be performed on a stack
The basic operations that can be performed on a stack are
• Push operation
• Pop operation
• Peek operation
• Empty check
• Fully occupied check

18. State the different ways of representing expressions
The different ways of representing expressions are
• Infix Notation
• Prefix Notation
• Postfix Notation

19. State the advantages of using infix notations
• It is the mathematical way of representing the expression
• It is easier to see visually which operation is done from first to last

20. State the advantages of using postfix notations
• Need not worry about the rules of precedence
• Need not worry about the rules for right to left associativity
• Need not need parenthesis to override the above rules

Read More Questions:
Data Structures Interview Questions Part1
Data Structures Interview Questions Part2
Data Structures Interview Questions Part3
Data Structures Interview Questions Part4
Data Structures Interview Questions Part5

No comments:

Post a Comment