Question Bank (IT-1) Data Structures
Question Bank (IT-1) Data Structures
(for Internals – I)
Part - A
1. Define linked list. Write the representation of linked lists in memory
2. How the nodes are represented using C
3. Explain linked list operation with examples
4. What is doubly linked list. Write the declaration of doubly linked list in C
5. With the C program explain how the elements are inserted and deleted from a
doubly linked list
6. Write a note on a header linked list
7. Briefly explain linked stack and queue
8. Apply linked list to represent two polynomials and write a function to add the
polynomials using linked list
9. Explain a linked list representation for sparse matrices
10. List out any two applications of linked list and any two advantages of doubly
linked list over singly linked list
11. Write short note on circular lists. Write a function to insert a node at front and rear
end in a circular linked list. Write down sequence of steps to be followed.
12. Write the following functions for singly linked list: i) Reverse the list
ii)Concatenate two lists
13. What is a linked list? Explain the different types of linked list with diagram. Write
C program to implement the insert and delete operation on a queue using linked
list.
Part - A
Stacks:
1. Define a stack. Explain the operations performed on a stack with examples.
2. How is a stack represented using an array? Write a C program to implement stack
operations using arrays.
3. Describe how a stack is implemented using a linked list. Write a C program to perform
push and pop operations using a linked list.
4. Explain infix to postfix conversion using stack operations. Write a C program to
implement infix to postfix conversion.
5. Write a C program to evaluate a postfix expression using a stack.
6. Explain the use of stacks in implementing recursion. Write a C program to
demonstrate recursion using a stack.
7. What is stack overflow and stack underflow? Explain the conditions with suitable
examples.
8. Explain how a stack is used for balancing parentheses in an expression. Write a C
program to check for balanced parentheses using a stack.
Queues:
9. What is a queue? Describe the operations performed on a queue with an example.
10.Write a C program to implement a queue using an array.
11.Write a C program to implement a queue using a linked list.
12.What is a circular queue? Write a C program to implement a circular queue using an
array.
13.Explain the difference between a circular queue and a normal queue. Write down the
sequence of steps for enqueue and dequeue operations in a circular queue.
14.What is a priority queue? Explain its applications and write a C program to implement
a priority queue.
15.Explain a dequeue (double-ended queue). Write a C program to demonstrate insertion
and deletion operations in a dequeue.
Part - A
1. Define a Tree ADT (Abstract Data Type). Explain the key properties and operations
associated with a tree.
2. What is a general tree? Describe how a tree is different from other data structures like
arrays or linked lists.
3. Explain the different types of tree traversals: Preorder, Inorder, and Postorder with
examples.
4. Write a C program to perform preorder, inorder, and postorder traversals of a binary
tree.
5. What is a level-order traversal of a tree? Write a C program to implement level-order
traversal using a queue.
6. Explain the Left Child-Right Sibling representation of a general tree. How is it
different from the binary tree representation?
7. Write a C program to convert a general tree into its left child-right sibling
representation.
8. Define a binary tree. What are the different types of binary trees? Explain each with
diagrams.
9. What is a full binary tree, complete binary tree, and perfect binary tree? Provide
examples and differentiate between them.
10.Write a C program to create a binary tree and perform insertion and deletion
operations on it.
11.Explain the concept of a binary search tree (BST). How is it different from a normal
binary tree?
12.Write a C program to implement a binary search tree (BST) and perform search,
insert, and delete operations.
Expression Trees
13.What is an expression tree? Explain how an expression tree is constructed for a given
infix or postfix expression.
14.Write a C program to construct an expression tree from a postfix expression and
perform inorder, preorder, and postorder traversals.
15.Explain how expression trees are used to evaluate arithmetic expressions. Write a C
program to evaluate an arithmetic expression using an expression tree.
1. Define a Binary Tree ADT. Explain the properties of binary trees and their various
types, such as full binary trees, complete binary trees, and perfect binary trees. (16
marks)
2. a) Describe the Left Child-Right Sibling representation of a general tree. Explain
how it works and how it differs from the binary tree representation. (8 marks)
b) Write a C program to convert a general tree into its Left Child-Right Sibling
representation. (8 marks)
3. a) Explain the different types of tree traversals: Preorder, Inorder, Postorder,
and Level-order. Illustrate with examples. (8 marks)
b) Write a C program to implement Inorder and Postorder traversals of a binary
tree. (8 marks)
4. What is an Expression Tree? Explain how an expression tree is constructed for a
given postfix expression. Write a C program to evaluate an arithmetic expression
using an expression tree. (16 marks)
5. a) What is a Binary Search Tree (BST)? Explain how insertion and deletion
operations work in a BST. (8 marks)
b) Write a C program to implement a Binary Search Tree and perform insert
and delete operations. (8 marks)
6. Explain how trees can be used to represent hierarchical data. Give examples of
hierarchical data that can be represented using trees, and discuss the advantages of
using trees for such data. (16 marks)
7. a) Describe the Preorder and Postorder traversals of a binary tree with
appropriate examples. (8 marks)
b) Write a C program to perform Preorder traversal of a binary tree. (8 marks)
8. Compare and contrast Binary Trees with General Trees. Discuss their structure,
representation, and applications in data structures. (16 marks)
9. a) Explain the steps to convert an infix expression to a postfix expression using a
stack, and show how an expression tree can be built from the postfix expression. (8
marks)
b) Write a C program to build an expression tree from a postfix expression. (8
marks)
10. What are the key differences between Binary Trees and Binary Search Trees
(BSTs)? Write a C program to construct a BST and perform search operations on it.
(16 marks)