important practicals of Data structures.

mansi2006shukla 6 views 26 slides May 28, 2024
Slide 1
Slide 1 of 26
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26

About This Presentation

Related to dsc practicals for computer engineering students.


Slide Content

ION
e questions. Attempt any
à 3x10=30
algorithm for inserting an element
ry search tree.

two ways of representing a binary
“tree in computer memory with suitable

Write short note on:

a) Array

b) Linked List

Write an algorithm to delete an element from

agiven list. Also show with an example.

"What is quick sort . Explain its working by
taking suitable example.

(4) 030833

Time : 3 Hrs.

3 Sem. / Comp. / 1.T. CNC
Subject : Data Structure

M.M. : 100
SECTION-A

Note: Very Short Answer type questions. Attempt

Q1

any 15 parts.

a)
b)
c)
d)
e)

1

9)
h)
i)
i)
k)

(15x2=30)
Define stack.

What is doubly linked list.

Explain the term overflow.

Whatare local variables.

Name the operations performed on data
structures.

State the concept behind bottom - up
Programming.

Whatis meant by pre - order traversal.
Define Dequeue.

Whatis binary search.

Whatis constant.

Give two differences between stacks

(1) 030833

Note:

Q2

Short answer type questions. Attemp
ten parts

and queues.
Give two applications of stack.

Define binary trees.

State the difference between sequential
and linked representations.

Stacks are also called «lFO lists. Is it
true of false?

List various types of queues.

Name application areas of trees

What are various non - linear data
structures.

SECTION-B

Give difference between constants and
variables

What are the advantage of linked lists
over arrays.

List various operations possible on stack

. Explain with example.

Differentiate between array and linked
lists

(2) 030833

v) Write an algorithm to insert an element
into linear array.

vi) Discuss any two methods of traversing a
binary tree with example.

Vi) Convert the following expression into
prefix form A+(B/C - (D *E)+H

vili) Write an algorithm oflinear search

ix) In what way doubly linked lict is better
than single linked list. Give example.

x) For the following binary tree, write down
the post order traversal

xi) How binary tree is different from binary
search tree.

xii) Whatare the applications of linked list.

xiii) What are front and rear pointers of
queue. How pointers changes when we
delete an element.

xiv) Explain merge sortin brief.

(3) 030833

Q29 Give difference between a ee oe binary
search. (CO-6)

Q.30. Sortthe following list of elements using bubble sort. Show
resultafter each step. (CO-6)
16-15 12 19 18 50 17 | a

Q: ae the RU ay 2 (cos)

15 out of three Questions. (2x10=20)
0.36 == of Arrays? Explain how element
x re stored in memory? (co-2)
| Q37 Explainbinary rue example?
E Give algorithm, (CO-6)
Buona into Ps notation ©

Sem.
Branch: Computer En:

Subject : os E
Time: 3 His. ei E MM. : 100°

ie What will be in the output screen ifthe following ea
“of operations are executed? N +4)
oS one i Push (bis): >
I > =Pop(): > Push (c,s);
PS ac Abo ee bb
BR Eee rd, ach
Q6 Variable tt that stores the address of another variable is
‚called co,
m b, Array
re d. Function :
== data structure. + (02)
bi ici

—d, Noneofthe above
= a8 PUSH operation ina already ull stack: resultin (CO-4)
A Oveifiow © al Underflow-

——b. Elamentwilibeinserted” ¢!"Noné ofthese |

Q:9__In infix.t In when an operand is read,
ich ofthe followingis done? (COS)
(. Itis placed on tothe outpı $
Sb: Is picedinoprtrstacts, = +
©. Itisignored E =
+ -d: Operatorsta E N
Q.10 Of the following choices,
[Fi

hs | SECTIONS
FDP Pme Questions. All Questions are “compulsory.
nis nr

on mat value does! wen

ÁS

2 For alinear array A(15, 16, 27 25): Find re
numberof elements. (co-2)
{When Ie function calls self is called BL"

14 Linked list is a/Li"ala Structur TC
Node of a ed st online. and L' parts: (CO-3)
Expand the term LIFO_— ay
Deletion operations in a Stackis called __ (COM

+ Give an example, of sorting method which uses
partitioning. ~ SAS CO),
Give the post ix Rotation of the given infixnotalion. A + 81

ACH =

eter ales à

Explain linear and non linear data structures. (CO1)
9 adding a elementir ee MCE

SS

Q6 When the function calls itselfitis called

103)

a) SelfDeclaration b) Non-Recursion
e) Recursion d) None

Q.7 What is the value of top, if there is a size of
stack, Stack_Sizeis 5? (Co-2)
a) 5 b) 6
c) 3 d) 4

Qs is a pile in which items are added at one
éndand removed from the other. (03)
a) Array b) Stack
©) Queue d) Tree

Q9 Adoubly linked list has pointers with
eachnode, (CO-3)
8) 1 b) 2
c) 3 d) 4

Q.10 Binary Search is applied to the listof
elements. (C04)
a) Sorted b) Unsorted
c) Both d) None

vo SECTION-B
“Objective type questions, ions are
See a

Q.11 Whatis Bubble Sort? (CO-4)

Q.12 What do you mean by Traversing? (CO-2)
Q.13 Whatis purpose of Rear in| Ge (co)
Q.14 Define Doubly Linked list. (CO-3)

@) 180842170882
120842/30833

S

No!

Q2

Q2

Q2
Q2
Q2

Q2

Q.15 The operation that combines the element of A
and Binasingle sorted list Cis called

(CO-4)

Q.16 Give prefixnotation ofA+B-C/D (CO-3)
Q.17 The identifier whose value remain fixed during
execution of programis called (CO-1)

Q.18 Define Stack. (C0-2)
Q.19 Whatisheightofatree? (CO-5)
Q.20 Give formula to calculate the size of one
Dimensional Array. (CO-1)

SECTION-C

Note:Short answer type questions. Attempt any
twelve questions out of fifleen questions
12x5=60

Q.21 What is Primitive and Non Primitive Data
structure? Explain any two Non Primitive Data

Structures. (CO-1)
0.22 What do you mean by traversal of a Tree?
Explain in detail with example. (C0-5)

Q.23 Write down algorithm for Binary Search. (CO-6)
Q24 Explain Circular queue with example, (CO-3)
Q.25 What is doubly linked list? Explain with

algorithm and example. (CO-3)

Q.26 When underflow and overflow condition comes

4 in Data structures. (CO-2)
2 Q27 Write algorithm for insertion and deletion of an
elementin queue. (CO-3)

(3) 180842/170842/

120842/30833

Q.28 Differentiate between Array and Linked List with
example. (CO-3)
0.29 Write short note on Full Binary Trees. Complete
Binary Tree and Extended BinaryTree. (CO-5)
Q.30 Explain terms used in Queue. (CO-2)
Q.31 Construct Binary Search Tree of 20, 55, 60, 30,
70, 90, 80, 95. Assume rootnode 60. (CO-5)

Q.32 Explain Selection Sort. (CO-4)
0.33 Explain the various data structure operations.
(CO-1)

0.34 What is variable? Difference between local and
global variable. (CO-1)
2.35 Whatis the purpose of avail list and null pointer
inlinked list? (CO-3)

SECTION-D

Note:Long answer type questions. Attempt any two
questions out of three questions. 2x10=20

Q.36 List Various Searching Techniques. Compare
them and write algorithm ofanyone. (CO-6)

Q.37 Whatis Array? Whatare the different operations
that are performed on Array? Write algorithm of
anyone operation on LinearArray. (CO-1)

Q.38 Convert the following expression into postfix
Notation using stack with algorithm CO-3)

(A+B)"C-(D-E)*(F+G)
(Note: Course outcome/CO is for office use only)

(8340) @)

180842/170842/
120842/30833

20.00.10,

x
:

EE8OE/Cb8OZ1/
TrSOLI/CHROSI,

en
391509 SL 351 OUT Kiqnop.

ordsenxosaunbang (q
"SSORPOAPAMMOAUFASIOARN UNO (e

(-09) “ast pour,

aqnoge MO MONS HI JO IA, D

NATION (p ana (9

opxepun (q AOHPAO (e

(£-00) tana a to

'won2}2P 210}2q PAYA JO:9q 07 LONIPUO AresS000Ua y,

dAOQUINJO DON (p e (o

Izer (q AO

(09) ¿IPAOUIALH 207 19p10 99 pInoA yey ‘onan
VU POLOSUE Op, pn ¿E “2,1, Siuausafa amp Jy
“stuowia|9

Powasur ise[ 91 SUIFIUOD Yazıs am jo dog (p
HUE Jopuanbos e ul PAIOIS Au SWEET (>
Odlasmoroppus (q
Pnsamwauapduno)pasnaquvoskeuy (e

(6-00) camionns ep yonse
9) wines 1901100 ayp 200 STÄULMOIIOF 2 JO YU
DEV (P "av ©
D+av+ (q Goatv @

(09).
sry Jo unoy xyyasd amp STBUMO]OJ AU JO YONA
anand) (P an rue e
astpoxurT (Q pas (e
co) vl juonmiouxyad

PAUL ay) 1101009 01 pazInbad staamıonns CEP HAN
nogeayjoauon (P
Wonao|jooaBeqreny (a

mono (22
mourpun (e

60
so
Lo
90

so

9-09) ayy Stony ot ED
E Bunt0s: IN Fun ei
Go pipas wuigeumopaium. ZO,
60) ER

u san Kmurg e osıonen 0) unnnodfe uw num. ICO à
_(09=5xz1) ‘Suonsanb wsaypjjo no such >
anpomı Aue iduuy “suonsonb adÁi samsue Long N
D-NOLLOAS

roues ee ue Sun 01 OC)
(€09) “1renuanbos
[Awopury) passaoos: xt feu uv un SIDE STD
Lan Sn $1
(6-09) pou” Jofuressooid *
‘hia Sums 001], Kung Y Jo Jesionen POI UL LTD >
00) D msi 910 ©
coy ono. e =
E SOU 1 200 a eo Au jo Jo mure ou SPD

(09) “oimonaig gama
(1-09)

parte st wazgosd zejronsedv ajos on
280081 ysıfug ut onu stononuysut jo souanbag ELO
(00) “umpuoñivougog zo M Co
(1-09) D pm ot
9PUEA Somoue Jo searppu sas wm ONG 11D
(o1=1x01) “Ksos¡nduuoo
218 suonsonb ¡py “suonsonb ad& samoafgo mon À (Co:
@-NOLLAS er]
“apousnornoid | 3

Hi pur mou al Jo sossauppe ax sa0NS 11 (P u

| No.

of Printed Pages : 4

| Roll No. . 180842/170842/

120842/30833'
Ath SEM / Computer Engg.
Subject : Data Structure Using C

Time : 3 Hrs. MM. : 100
SECTION-A
| Note:Multiple choice questions. All questions are
compulsory (10x1=10)
a Variable that stores address of another
| variable (CO-3)
| a) Pointer b) Array
| ©) Function d) Stack
Q2 Arayisa datastructure. (CO-2)
a) Linear b) Non-Linear
| c) Both d) None
De Bu SS Sew
— (CO-5)
| 2) Specialtrees b) Pointertrees
€) Threadedtrees d) None
Q4 Alinear list in which the last node points to the
firstnode is: (CO-3)
a) singlylinkedlist b) doubly inked list
| ©) circularlinkedlist d) None
as

POP operation in emply stack may result in

overflow. (CO-3)
a) True b) False

a 1808421170842

12082/30833

Q9 Give the post fix notation of the given infix
notation, A+B/C-D' (CO4)
Q.10 Each node of a binary tree can have at most
77° chitdren (COS)
SECTION-B
Note: Very Short answer type questions. Altempt any
ten parts 10x2=20
Q.11 Define Algorithm (CO-1)
0.12 Name any four linear data Structures (CO-1)
0.13 Define linked list (co-3)
Q.14 What are the various operations that can be
performed on anArray. 02)

0.15 Give the formula for calculating the address of
an element in column Major form

representation of array. (CO)
0.16 Give the node structure of a linked list. (CO-3)
Q.17 Define Queue. (co)
Q.18 Give two applications of a stack. 04)
0.19 Define Complete Binary Tree. 05)
0.20 Define Degree of a Tree (cos)

0.21 What is the precondition for performing binary
search operation on a given list of elements.
(cO-6)

Q.22 What are the advantages of Doubly Linked List.
(CO-3)

(2) 170842/120842/30833

SECTION

6 Alten

e various types of data

0.24 Give

0.25 Expl

0.25 Give algonthm for

ine Array G

ing an element form the
(CO-4)

0.29 What is the limitation of alinear queue. How is it
removed. 1CO-4)

0.30 Give inorder, postorder and preorder traversal
ofthe following tree, (C0-5)

- @
6) ©
© © ©

(3) 170842/120842/30833

Q.31 Give differences between sequential search
and binary search. (CO-6

Q.32 Sort the following list of elements using bubble

sort. Show result after each step. (CO-6)
6 10 29 1 5 7
SECTION-D
Note:Long answer type questions. Attempt any three
questions. 3x10=30

Q.33 What are different types of Arrays? Explain how
element of arrays are stored in memory?

(CO-2)

Q.34 Explain Sequential search technique with

suitable example? Give algorithm. (CO-6)

4.35 Convert the following expressions into postfix

notation using Stack (CO-4)
A+B*C+D/E-F

Q.36 Write short note on (CO-1)

a) Structured programming
b) Tower of Hanoi

eeeoezreozt
2580LL/Zve081 @

“worsinssy suyeg gio
LPOu 1001 SI Jeym SLD
CUMOEN

EU ZLD

ANAND auyaq Lp

Kosnduon eiesunnsenn "©

ly ‘suonsenb 3d} uoneıduon | sanoafa
SNOILI3S

srogeauiony (p ainianigabeiog (o

schmen (3 amener (e

y Pares sipañuese

Lor sve sua elep au dou u Kem au gy:
ee am te

pop SA MU fe Gr

2 uonsiag (o

SEBDEZVBOZL
IZPROLLIEPBORL w
Suns (p 1004 (o
HULL on (q jeune, (e
(soo) paıeo SI UAIPIYD OU YM BPCN SO
von (p Wor E
doy (9 usng (e
O ou OBIS uruonesedouonaian yO
| punoqsaddn (p punoguamo (>
sur (q vonsenxe
paneo
fee ue jo JUS \soHeWS Sy, ED
E > (e eo
za ve
I peur Aanop
¿ho 10001 pou jo some und 20
sau (P anand (o
| was (a Keuy (e
monas
aj wy à m
(ol=1*01) | AosmduoD
De suansonb IV Suonsonb sou) rdnmy 010M
| VNOLLI3S
| oo nm SH eau

9 Butsn onions weg : v0fqns
| SuyoouiBua saindwog rues up
| eenosrzraozı
yeva0LLieve0ss. ä NE
Yo sobe pan
|
À

Q.17 Define Linked List.
Q.18 Give postfix notation of A+B-C/D,
Q.19 In a queue, the initial values of front

(Cogy
(Coa)

frarepointerrshouldbe___and__ (cos
Q.20 Whatis two Dimensional Array? con
SECTION-C )

Note: Short answer type questions. Attempt any twelve

questions outoffifteen questions. (12x5-60)
Q.21 Whatis Singly linked list? Explain with algorithm
and example. (CO3)
Q.22 What is Binary Search Tree? Write down its
properties. (Cos)
Q.23 Explain Preorder, Postorder and Inorder
traversal with example. (CO2)
Q.24 Explain Linear queue with example? What are
its disadvantages? (CO2)

Q.25 Write algorithm for insertion and deletion of
elementin stack. (CO2)
Q.26 Explain linear and Non Linear Data Structures.
(cot)
Q.27 Write the difference between Static and
Dynamic Memory allocation (co1)
Q.28 Construct a binary tree whose node are as |
under (Cos)
Preorder:ABD GHCEFIKJ
Inorder: BGHDAECIKFJ
0.29 Write down algorithm for Linear Search. (CO6)

0.30 What do you mean by Data structure? Explain
the various data structure operations. (CO1)
Q.31 Explain terms used in Queue. (co2)
Q.32 How can Linked list overcome the limitations of
array? (CO2)
0.33 Define the terms in binary tree: Path, Sibling,
Levelof a node Height of Tree. (COS)
Q.34 Explain Bubble Sor! (co4)
Q.35 Why Stack is known as LIFO? What is the
significance of TOP pointer? (Co2)
SECTION-D
Note:Long answer type questions. Attempt any two
questions outofthree questions. — (2x10=20)
Q.36 Convert the following expression into postfix
Rotation using stack with algorithm (CO2)
(A+B*(C-D)/E
Q.37 What do you mean by Sorting? Explain why itis
required. Also name some sorting algorithms
and explain. (CO4)
Q.38 What is an array? What are types of array?
Explain how elements are stored in memory ?
(C03)

No. of Printed Pages : 4

Roll No. ...

170842/121 842/30833

4th Sem. / Trade : Computer Engg.
Subject : Data Structure using C

Time : 3 Hrs. M.M. : 100

SECTION-A

Note:Objectives questions. All questions are

Qi

Q.2

Q.3

Q4

Qs

Q6
Q7

Qs

compulsory (10x1=10)

The identifier whose value does not change
during execution of program is called

(CO-1)
For a linear array A[15, 16, 27, . 25],
Find the total number of elements. (CO-2)

When the function calls itself it is called
(CO.

Le -4)
Linked list is a data Structure.
(CO-3)

Node of a linked list contains and
Parts (CO-3)
Expand the term LIFO (CO-4)
Deletion operation in a Stack is called
P (CO-4)

Give an example of sorting method which uses
partitioning. (CO-6)

(1) 170842/120842/30833

No. of Printed Pages : 4

Roll No. ....

180842/170842/
120842/30833

4th Sem. / Computer Engg.
Subject : Data Structure Using 'C*

Time : 3 Hrs. M.M. : 100

SECTION-A

Note:Objectives questions. All questions are

Qt

Q2

Q3
Q4

Qs
Q6
Q7

compulsory (10x1=10)

(Course Outcome/CO)
Variable that stores address of another variable
is known as... (CO-3)
A collection of homogenous elements is
(CO-2)
Anodein a Two-waylisthas.......parts. (CO-3)

The address field of last node in a linked list

contains.......... Value. (CO-3)
LIFO stands for... (CO-3)
Define an infix expression. (CO-2)

List two types of searching techniques. (CO-6)

(1) 180842/170842/
120842/30833

Q8 Arranging the elements in an order is

called. (co-4)

Q.9 Which Tree can have at the most two children?

(c0-5)

Q.10 Treeisanon-linear data structure.(T/F) (CO-5)

SECTION-B

Note:Very Short answer type questions. Attempt any
tenparts 10x2=20

Q.11 Define variable. (co-3)
Q.12 Define primitive data structure. 0-2)

Q.13 Differentiate between array and record. (CO-3)

Q.14 List various operations that can be performed

onarrays. (co-3)
Q.15 Differentiate between single linked list and two-
way linked lst. (c0-3)

Q.16 Define QUEUE. (cO-3)
Q.17 Write postfix expression for "A+B"C-D".
(co-2)

Q.18 Write any two applications of stacks. (CO-2)
(2) 180842/170842/

120842/30833

Q.19 Define recursion. (CO-2)
0.20 Define complete Binary Tree (co-5)
Q.21 Define Binary search. (COS)
Q.22 Define the term "Height" in Trees. (CO-5)

SECTION-C

Note:Short answer type questions. Attempt any five
questions out of ten questions. 5x8=40

Q.23 Discuss Top-down programming approach
(co-1)

074 Differentiate between static and dynamic
memory allocation. (co-3)

Q.25 How elements of a queue can be removed?
(CO-3)
Q.26 Write a program in’C’'to print Fibonacii series up

to Sterms usingrecursion 03)
Q.27 Explain dequeue in brief. (CO-3)
Q.28 Discuss various operations performed on data
structures. (c0-3)
@) 180842/170842/

120842/30833

Q.29 List various operations possible on stack using

suitable example. (CO-3)

Q.30 Differentiate between 1-D and 2-D arrays

(CO-3)

Q.31 Write down binary search algorithm. (CO-6)

Q.32 Discuss the concept of recursion. (CO-3)
SECTION-D

Note:Long answer type questions. Attempt any three
questions. 3x10=30

Q.33 Define traversing. Write down traversing
algorithm of an array. (CO-3)

Q.34 Write an algorithm to insert a new node into a
sorted linked list. (CO-3)

Q.35 Explain the post order tree traversal algorithm
with suitable example. (CO-5)

Q.36 Write down algorithm for bubble sort technique
with suitable example. (CO-4)

(Note: Course outcome/CO is for office use only)

(1800) (4) 180842/170842/
120842/30833