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

Screenshot 2024-12-05 at 9.42.56 PM

The document outlines the syllabus and problem sets for a B.Tech course in Data Structures and Algorithms for the academic session 2024-25. It covers various topics including pointers, linked lists, stacks, queues, trees, and graphs, along with specific programming tasks and theoretical questions for each unit. Additionally, it lists required textbooks and reference materials for the course.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views8 pages

Screenshot 2024-12-05 at 9.42.56 PM

The document outlines the syllabus and problem sets for a B.Tech course in Data Structures and Algorithms for the academic session 2024-25. It covers various topics including pointers, linked lists, stacks, queues, trees, and graphs, along with specific programming tasks and theoretical questions for each unit. Additionally, it lists required textbooks and reference materials for the course.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

AD DAMSWARO0P AEMORIAL NIVEDSITY

DROBLEM SI-I|
Semester
Session : 2024-25(Odd Sem.) Subject Code
Course B.Tech. UCS301|
Subject Name Data Structures and
Branch : CS
Group : CS(ALL)
Name of Fnculty Member Algorithms
Mr. ljtaba Salccm Khan,Mr.
Kamlesh Chandra Maurya,Dr.
Satya Bhushan Verma,Ms.
Abhilasha Mandal,Mr. Sunny
Kumar, Ms. Atifa Pravcen,Mr
|Ravi Prakesh Visvakarma,Ms.
Homa Rizvi
Unit
TopicCovered : Pointers and Linked List

Unit-II

1. What is a pointer variable? What is static memory allocation and dynamic memory
allocation?
2. Build a function int strlen(char *str), that computes the length of the string str using
pointers for referring to characters in the string.
3. Build a function char *strepy(char *src), that makes a copy of str using pointers for
referring to characters in the string.
4. Build a function void checkPalindrome(char *str), that does the work using
pointers for referring tocharacters in the string.
5. Write a function char *strreverse(char *orig), that does the work using pointers for
referring to characters in the string.
6. Compare the advantages and disadvantages of using array list and linked list.
7. Describe circular linked list. Implement it using create),insert(), and delete()
functions.
8. Build a function to reverse the linked list in pair If you have a linked list that holds
1234 NULL then after function has been called the linked list would be 2 143
NULL.
of linked list.
9. Builda C program to swap m and nth elements function to insert a
10.Build a Cprogram to implement doubly linked list Write a
node after a particular node given by user.
insert it in the beginning.
11.Builda Cprogram to remove the last node of the list and

Supplementary Questions:
given linked list with first
1. What does following function do for a
node as hrad? void fun1(struct node* head)

if(head--NU
LL) return;
fun1(head->next);
printf( %d",head
>data);
following
theoutput of
2. Whatis voidf(int*p,intm)
program?
m=mt5;
p=*ptm
;return;

void main()
int
i-5,j=10;
f(&lj);
printf("%d"itj);

TEXT BOOKS:
Edition,McGraw Hill2015
T1.Seymour Lipschutz,Data Structures,Reprint First Publications,2012
T2. S. K. Srivastava, DataStructure through Cin Depth,2, BPB
T3.Paritosh K. Bansal, Data Structure using C,2,Krishna Prakashan,2011
REFERENCE BOOKS:
RI. Brian W. Kernighan, Dennis M. Ritchie, The CProgramming Language,2, Pearson Education,2012
R2. Horowitz, Sahani, Anderson-Freed, Fundamentals of Datastructures in C,2,Universities Press,2012

(Signature of the Faculty Member with date )

(Signature of theDean with date )


HRLIRAMSWARDOP MEMORIAL
Session
Course
:2024-25(Odd Sem.)
: B.Tech.
PROBLEMSETIII
Semester
Subjcct Code
: III
UNIMERSITY
Branch :CS Subject Name :UCS3011
Data
Group :CS(ALL) Name of Faculty Member : Mr. Structures and Algorithms
Ijtaba Salcem
Khan,Mr.
Kamlesh Chandra Maurya,Dr.
Satya Bhushan Verma,Ms.
Abhilasha Mandal,Mr. Sunny
Kumar, Ms. Atifa
Pravcen,Mr
Prakesh Visvakarma,Ms. HomaRavi
Rizvi
Unit : III Topic Covered
Unit-III :Stacks and Queues.
1 Jee of Stack to check
whether the 1Ollowing iniix expressions are valid or not. Show stacks status
after every step in tabular formn.
a) (A+B*(C-D)/[E+F))
b) ((A-B)+D/(E+F)*G))
c) (A+B)* [C/D*(E-F)]
d) 14/7*3-4+9/2
e) {A-[B+C-(D/E)* [F-G]+{H-I}]}
2. Change X: A+
form. (B*C-(D/E-F)*G)*H into postfix form showing stack status after every step in tabular
3. Build a Cprogram to implement a stack using
4. Build a Cprogram to convert an infix array.
5. Evaluate the postfix expression expression into the prefix expression.
6. Evaluate the postfix expressionABC*DE/F-*-*+ if A=2, B=5, C=8, D=1, E=3 and
10 5 +60 6/* 8 -,Also write a C program to F=10.
expression. evaluate a postfix
7. Change the
following infix expression to their equivalent prefix and postfix expressions:
a) A-B/C
b) (A*B) +(C-D)
c) ((AB)/C) +D
d) (A+B)*(C/D)E-F
e) (A-B)/C*((C-D/C+D)
f) A^B^C*D
g) (A+B)*D+E/(F+G+D)
8. Change the following toinfix form:
a) AB+C*D
b) */A+BCDE
c) *+-ABCD
d) ABCA
e) ABC/+DE/F*.
9. The following sequence of operation is performed on a stack:
Push(10),Push(20),Pop, Push(10),Push(20), Pop, Pop, Pop, Push(20),Pop. Find out the sequence of
values popped out.
10. How circular queue is better than the linear queue?
11. Create the queue structure in each case when the following operations are performed on an empty
queue.
a) Add A,B,C,D,E,F
b) Delete two letters
c) Add G
d) Add H
e) Delete four letters
f) Add I
12. What are the disadvantages of a queue?
13. Builda Cprogram for insertion and deletion operations performed on
the simple
Supplementary
14. The Questions:
tollowing postfix expression withsingle digit operands is evaluated
823^/23*+51 *.
Fndthetop two clements of the stack after the first * is evaluated. using astack.
15. Show how to
implement one queue efficiently using two stacks.
TEXT BOOKS:
1. Seymour Lipschutz, Data
Structures,Reprint First Edition, McGraw Hill,2015
12.S. K. Srivastava, Data Structure
through Cin Depth,2,BPB
T3. Paritosh K. Bansal, Data
Structure using C,2,Krishna Publications,2012
Prakasha,2011
REFERENCE
R1. BOOKS:
Brian W. Kernighan, Dennis M.
R2. Horowitz, Ritchie, The CProgramming
Sahani, Anderson-Freed, Language,2,
Fundamentals of Data structures Pearson Education, 2012
in
C,2,Universities Press,2012

(Signatare of the Faculty Member with date )

(Signature of theDean with date)


RAMSWAROOP MEMORIAL
PROBLEM SEI -IV
UNIVERSITY
Sslon
:2024-25(0dd
B.Tech.
Sem.) Semester
ourse
:CS
Subject Code :UCBO|
Wrnnch
:CS(ALL.)
Subject Name Data Structuresand Alyuithms
Group Name of Faculty Member: Mt lËtaba Saleem Khan, Mr
KamleshChandra Maurya,r Satya
Bhushan Verna,Ms Abhilasha
Mandal,Mr. Sunny Kumar, Ms
Atifa Praveen,Mr Ravi Prakesh
Visvakarrma,Ms Hona Rizvi
Unit Topie Covered :Trees
UNIT- IV

1. Discuss the properties of binary tree. What is Binary Search Tree? How it is
different from Binary Tree? 2L, D-0.
L' of a binary tree is
2. Show that the maximum number of nodes at levcl

3. Construct the binary tree from following traversal:


a. In order :12,31,10,45,66 Preorder: 12,31, 10, 45, 66
b. In Order :11,12,23,24,25,32,43,46,54, 65
Preorder:32,23,11,12,24,25,43,54,46,65
Post order: 68 2193 2635
c. In order: 35,26,93,21,68 expression in to the Binary Expression Tree:
arithmetic
4. Change the following (4^2)
a. (5 + z) /-8) *
b. (5 +6) x (2+1) +2)-(3×(7-4) +6))
C. ((3+1)×3)((9-5)
+6/(x+z)
d. (5-x)* y
(a-b )/c*((c-d/c +d))
e. ((5+2)*(2-1)/((2+9)+(7-2)-1))»8) tree.
f. and traverse in a binary search empty binary
to insert, delete order into an
5. Build a
program are inserted in
following eight numbers
the
6. Supp0se
search tree T:
30
35, 60, 40,Binary
50,33, 44, 77,diagram SearchTree.
of numbers:
Constructthe Search Treefrom these
Constructa Binary
7. 98,2,48,12,56,32,4,67,23,87,23,55,46
21,39,45,54and63 from the tree
Insert
a)
delete nodes 23,56,2,
and 45
element into binarytree.
binary tree.
an
b) algorithm for inserting sum of allelements in
8. Buildan algorithm for finding the sort.
heap
9. Buildanprogram to implementfollowing elements:
10. Build a
heap by inserting the
index of leftandright
11.Create a out the
45,27,36,18,21,23,10
10, 21 and 23. Alsofind
parent of node sequence:
Findout the 23. data arrivingin
child ofnode the following
12,20,26,4,16,18,24,25
order5 for and19. order:
a B tree of elements in
12. Create
3,14,7,1,8,5,11,17,13,6,23,insertingthefollowing
by
Construct anAVLtree
13. 16,27,9,11,36,54,81,63,72
Supplementary Questions:
a Bt tree of order S with the following numbers arriving in ordor.
4. Create
ession
90.27,7,9, I8,21,3,4.16,11,21,72
15, We are given aset of ndistinct elements and atn unbalanced binary trce with nnodes Co
populate the tree with the
given set so that it
Inhow many wavs can
binary search tre?
we becomes a
TEXT BOOK:

Lipschutz. Data Structures, Reprint First Edition, McGraw Hill,2015


T1. Seymour Structure through C in Depth,2,BPB
Publications,2012
T2. S. K.Srivastava,Data C,2,Krishna Prakashan,2011
T3. Paritosh K.Bansal, Data Structure using
REFERENCE BOOK:

RI. Brian W. Kermighan, Dennis M. Ritchie, The C Programming Language,2,Pearson


Education,2012
R2. Horowitz, Sahani, Anderson-Freed, Fundamentals of Data structures in C,2,Universities
Press.2012
R3. Yashvant Kanetkar,Data Structures Using C,3,BPB Publications,2013

(Signature bf the Faculty Member with date)

(Signature of the Dean with date)


RAMSWADOP MAEMORIAL UNIVERSITY
sion
|:2024-25(Odd Sem.)
: B.Tech.
PROBLEM
Semester SET-V : III
Surse

: CS
Subject Code :UCS301
hranch
: CS(ALL)
Subject Name Data Structures and Algorithrns
Group Name of Faculty Member :Mr. ljtaba Salcemn Khan,Mr.
Kanlesh Chandra Maurya,Dr. Satya
Bhushan Verma,Ms. Abhilasha
Mandal,Mr. Sunny Kumar, Ms.
Atifa Praveen,Mr Ravi Prakesh
Visvakarma,Ms. Homa Rizvi
Unit :V Topic Covered :Graphs
UNIT- V

1. List five situations from everyday life in which graphs arise naturally.
2. How can a graph be represented using an adjacency matrix? Write an algor1thm
for the same.
3. Create
a simple graph,
ii. a non-simple graph with no loops,
iii. a non-simple graph with nomultiple edges,
Each with five vertices and eight edges.
4. Show that if a graph is simple, then E<=V(V-1)/2.
5. Explain the following termswith the help of examples:
o. In-degree
a. Graph h.Length of Path p. Out-degree
b. Undirected Graph i. losed Path
q. Source
c. Directed Graph j. Simple Path
r. Sink
d. Weighted Graph k. Cycle s. Pendant Node
e. Adjacent Nodes 1. Cyclic Graph t. Isolated Node
f. Incidence
m. Acyclic Graph u. Connected Graph
n. Degree
g. Path
algorithm to
Tree? Explain the Prim's and Kruskal's
Spanning
6. What is Minimumspanning tree. 4}. Entry Wij in
create a minimum undirected graph with vertex set {0, 1, 2, 3,minimum possible
complete the
7. Consider a below is the weight oftheedge {i, j}. What is 0is a leaf node in the
the matrix W that vertex
spanning tree T in this graph such
weight of a
tree T.
1 1 4'
12 4 9
1
W=|8 12 07 3
1 4 7 0 2
4 3 2 0)
have
edges a directed graph with n vertices can
maximum number of
8. What is the
and still not contain a
directed cycle?
with no parallel edges and self-loops are
directed graphs
9. How many simple of V?
possible in terms
between DFS and BFS? graph.
10. Differentiate between every pair of vertices in a given
graph distances
11.Find the shortest given graph doesn't have negative edges.
Let us assume that Algorithm.
implement Warshal
12. Builda Cprogram to
13. Builkd a Cprogram to implement Ditkstra Algorithm
14.Crcate allthespanning trecs inthe graph of Fig-land Fig-2.
b

Fig. 1 Fig. 2

Supplementary Questions:
1. Let Gbe a directed graph whose vertex set is the set of numbers from 1 to
100.There is an edge from a vertex ito a vertex j iff either j=i+1 or j=3i. The
minimum number of edges in a path in Gfrom 1to vertex 100 will be?

2. What is the largest integer m such that every simple connected graph with n
vertices and n edges contains at least mdifferent spanning trees?
TEXT BOOK:
T1. Seymour Lipschutz,DataStructures,Reprint First Edition,McGraw Hill,2015
T2. S. K. Srivastava, Data Structure through Cin Depth,2,BPB Publications,2012
T3. Paritosh K. Bansal, Data Structure using C,2,Krishna Prakashan,2011
REFERENCE BOOK:

RI.Brian W. Kernighan, Dennis M. Ritchie,The CProgranming Language,2, Pearson Education,2012


C,2,Universities Press,2012
R2.Horowitz, Sahani, Anderson-Freed,Fundamentals of Data structures in
R3.YashvantKanetkar,Data Structures Using C,3,BPB Publications,2013

(Signáture of the Faculty Member with date)

(Signature of the Dean withdate)

You might also like