0% found this document useful (0 votes)
43 views8 pages

DS Question Bank

The document is a question bank for the Data Structures and Applications course (BCS304), covering various topics including data structures, memory allocation, arrays, polynomials, stacks, queues, linked lists, trees, graphs, and hashing. It includes theoretical questions, C programming tasks, and algorithms related to these topics. The questions are organized into modules, with practical programming assignments aimed at reinforcing the concepts learned.

Uploaded by

himeshss6105
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)
43 views8 pages

DS Question Bank

The document is a question bank for the Data Structures and Applications course (BCS304), covering various topics including data structures, memory allocation, arrays, polynomials, stacks, queues, linked lists, trees, graphs, and hashing. It includes theoretical questions, C programming tasks, and algorithms related to these topics. The questions are organized into modules, with practical programming assignments aimed at reinforcing the concepts learned.

Uploaded by

himeshss6105
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

DATA STRUCTURES AND APPLICATIONS (BCS304)

QUESTION BANK

MODULE 1

1. What is Data Structures? Classify and Explain them briefly.


Also explain the basic operations that can be performed on data structures. List out
the applications.

2. What are the different types of memory Allocation? Explain the Different
functions that supports Dynamic Memory Allocation
3. Differentiate between static and dynamic memory allocations.

4. Define Structures .Illustrate different ways of declaring structures with


Example
5. List and explain 3 types of structures used to store the strings
6. What is an array and how the array pointers are declared.
7. Explain about the representation of 2 D arrays in memory.
8. What is Polynomial? What is degree of polynomial?
Write a C Program to add 2 polynomials A and B, store the result in
polynomials C.

→Consider 2 polynomials, A(x) = 4x15+3x4+5 & B(x) = x4+10x2+1. Represent


polynomials using array of structures (show diagrammatically show these 2
polynomials can be stored in 1D array) and also give its C representation

→Consider 2 polynomials, A(x)= 2x1000+1 and B(x)=x4+10x3+3x2+1 with a


diagram to show how these polynomials are stored in 1D Array.
9. Explain dynamic allocated arrays.
10. D/W structure and union.
11. Explain strings. Declaration and initialization of strings.
12. String functions.
13. Define Stacks. Write the stack implementations for push and pop functions
using arrays(dynamic) with StackFull & StackEmpty conditions.(OR)List
operations of stack. Write C implementation of these ops.
14. Write a C Program to Convert infix expressions to postfix expressions. Convert
the following infix expressions to postfix expressions and prefix :
1. (a+(b-c)*(d-e)%f)
2. (a+b) * d – e / (f + a * d) +c
3. (( a / ( b – c + d)) * (e – f ) * g)
DATA STRUCTURES & APPLICATIONS (BCS304)
4. a+(b+c)+(b/d)*a+z*u
5. A-B/C(C*D+E)
15. Write a C Program to evaluate the following Postfix Expressions. Also evaluate
(trace) the following Postfix Expressions. (Also Algorithm)
•a / b – c + d * e – a * c, Where a=6,b=3,c=1,d=2,e=4.
•abc + * de / - Where a=5,b=6,c=2,d=12,e=4.
•ab/c – de*+ac* Where a=6,b=3,c=1,d=2,e=4
•123 + * 321 - + *
16. Write an algorithm for evaluating a valid postfix expression. Trace the same on
562+*841-
Module 2,3,4 and 5
1. What is queue? Explain the implementation of queue.
2. Implementation of circular queue.
3. Explain queue using dynamic array.
4. Write a C functions for following operations on Singly Linked list.
(i) Insertion at beginning.
(ii) Insertion at end.
5. Explain the implementation of queues using linked list.
6. What is linked list? Explain the different types of linked list with neat diagram.
7. Illustrate with C functions the following operations on Doubly Linked List:
1. Delete a node at the beginning
2. Delete at the specific position
3. Insert at beg
4. Insert at end
5. Insert at specific position.
6. Delete at End.
8. Write a C functions for following operations on Singly Linked list.
(i) Insertion at beginning.
(ii) Insertion at end.
(iii) insert at specific position.
(iv) Delete at end
(v) Delete at beginning
(vi) Delete at specific position.
9. Explain stacks and queues using linked list.
10. Define the following.
(i) Binary Tree (ii) Complete Binary Tree (iii) Degenerate Binary Tree. (iv) Perfect BT
11. Explain Threaded Binary Tree with suitable example.
12. What are the methods used for traversing a graph? Explain any one method with
DATA STRUCTURES & APPLICATIONS (BCS304)
Example. 13. Explain Counting Binary Tree with example.
14. Write a note on Optimal Binary Search Tree.
15. Define Hashing. Explain static and dynamic hashing.
16. D/W SLL and DLL.
17. . What is Graph? Show the representation of adjacency matrix and list for the
below graph.

OR
18. Write Inorder, Preorder and Postorder for the below Tree.

19. Briefly explain Single and Double ended Priority Queue.

20. Given a File of N employee records with a set K of Keys (4-digit) which uniquely
determine the records in file F. Assume that file F is maintained in memory by a Hash
Table (HT) of m memory locations with L as the set of memory addresses (2-digit) of
locations in HT. Let the keys in K and addresses in L are Integers. Develop a Program
in C that uses Hash function H: K →L as H(K)=K mod m (remainder method), and
implement hashing technique to map a given key K to the address space L. Resolve the
collision (if any) using linear probing.
21. Develop a Program in C for the following operations on Graph(G) of Cities a.
Create a Graph of N cities using Adjacency Matrix. b. Print all the nodes reachable from
a given starting node in a digraph using DFS/BFS method
22. Explain selection tree.
23. Construct Binary Search Tree for the element step-by-step
100,85,45,55,110,20,70,65,113,145,132,96.
24. What is leftist Tree? List and Explain the types of Leftist tree.
25. Define the following:
i. Graph
ii. Multi-graph
iii. Graph with self-edge
DATA STRUCTURES & APPLICATIONS (BCS304)
iv. Sub-graph
v. Complete graph

26. What is graph? Give matrix and adjacency list representation of graph. Show
adjacency matrix and list for the below graph.

27. Explain BST.


28. Representation of Disjoint sets.
29. Explain Counting BT.
30. Explain Graph abstract data types and operations.
31. Develop a Program in C for the following: a) Declare a calendar as an array of 7
elements (A dynamically Created array) to represent 7 days of a week. Each Element
of the array is a structure having three fields. The first field is the name of the Day (A
dynamically allocated String), The second field is the date of the Day (A integer), the
third field is the description of the activity for a particular day (A dynamically
allocated String). b) Write functions create(), read() and display(); to create the
calendar, to read the data from the keyboard and to print weeks activity details report
on screen.
32. Develop a Program in C for the following operations on Strings. a. Read a main
String (STR), a Pattern String (PAT) and a Replace String (REP) b. Perform Pattern
Matching Operation: Find and Replace all occurrences of PAT in STR with REP if
PAT exists in STR. Report suitable messages in case PAT does not exist in STR
Support the program with functions for each of the above operations. Don't use Built-
in functions.
33. Develop a menu driven Program in C for the following operations on STACK of
Integers (Array Implementation of Stack with maximum size MAX) a. Push an
Element on to Stack b. Pop an Element from Stack c. Demonstrate how Stack can be
used to check Palindrome d. Demonstrate Overflow and Underflow situations on Stack
e. Display the status of Stack f. Exit Support the program with appropriate functions
for each of the above operations.
34. Develop a Program in C for converting an Infix Expression to Postfix Expression.
Program should support for both parenthesized and free parenthesized expressions
with the operators: +, -, *, /, % (Remainder), ^ (Power) and alphanumeric operands.
DATA STRUCTURES & APPLICATIONS (BCS304)
35. Develop a Program in C for the following Stack Applications a. Evaluation of
Suffix expression with single digit operands and operators: +, -, *, /, %, ^ b. Solving
Tower of Hanoi problem with n disks.
36.Develop a menu driven Program in C for the following operations on Circular
QUEUE of Characters (Array Implementation of Queue with maximum size MAX) a.
Insert an Element on to Circular QUEUE b. Delete an Element from Circular QUEUE
c. Demonstrate Overflow and Underflow situations on Circular QUEUE d. Display the
status of Circular QUEUE e. Exit Support the program with appropriate functions for
each of the above operations.
37.Develop a menu driven Program in C for the following operations on Singly Linked
List (SLL) of Student Data with the fields: USN, Name, Programme, Sem, PhNo a.
Create a SLL of N Students Data by using front insertion. b. Display the status of SLL
and count the number of nodes in it c. Perform Insertion / Deletion at End of SLL d.
Perform Insertion / Deletion at Front of SLL(Demonstration of stack) e. Exit
38.Develop a menu driven Program in C for the following operations on Doubly
Linked List (DLL) of Employee Data with the fields: SSN, Name, Dept, Designation,
Sal, PhNo a. Create a DLL of N Employees Data by using end insertion. b. Display the
status of DLL and count the number of nodes in it c. Perform Insertion and Deletion at
End of DLL d. Perform Insertion and Deletion at Front of DLL e. Demonstrate how
this DLL can be used as Double Ended Queue. f. Exit.
39. Develop a Program in C for the following operationson Singly Circular Linked List
(SCLL) with header nodes a. Represent and Evaluate a Polynomial P(x,y,z) = 6x 2 y 2
z-4yz 5 +3x 3 yz+2xy 5 z-2xyz 3 b. Find the sum of two polynomials POLY1(x,y,z)
and POLY2(x,y,z) and store the result in POLYSUM(x,y,z) Support the program with
appropriate functions for each of the above operations
40.Develop a menu driven Program in C for the following operations on Binary Search
Tree (BST) of Integers . a. Create a BST of N Integers: 6, 9, 5, 2, 8, 15, 24, 14, 7, 8, 5,
2 b. Traverse the BST in Inorder, Preorder and Post Order c. Search the BST for a
given element (KEY) and report the appropriate message d. Exit

DATA STRUCTURES & APPLICATIONS (BCS304)


DATA STRUCTURES & APPLICATIONS (BCS304)
DATA STRUCTURES & APPLICATIONS (BCS304)
DATA STRUCTURES & APPLICATIONS (BCS304)

You might also like