SlideShare a Scribd company logo
1 of 4
Download to read offline
Totalnumberof printedpages– 8 B. Tech / MCA
BCSE3102/ PCS 1001/PCS1002
Second Semester Examination – 2008
DATA STRUCTURE USING C
Full Marks – 70
Time : 3 Hours
Answer Question No. 1 which is compulsory
and any five from the rest.
Figures in the right hand margin
indicate marks.
1. Answer the following questions : 2×10
(a) Define data structure. What do you mean
by ADT ? Define and differentiate between
linear and non-linear data structures.
(b) State applications for which binary tree is
most suitable. Explain representation of
binary tree in linear array.
(c) Describe ADT representation of queue
with commonly used functions.
(d) Write the conditions to test ‘‘Queue is
Empty’’, ‘‘Queue is Full’’, and ‘‘Queue
Contains ≥ 1’’ for a linear queue imple-
mented in linear array.
(e) Explain the data structure used to repre-
sent a sparse matrix.
(f) Why do you have to check the full and
empty conditions of a STACK (imple-
mented in linear array) ?
(g) Define with example Height Balance Tree.
What is the worst cases height of such
tree ?
P.T.O. BCSE 3102 / PCS 1001/PCS 1002 2 Contd.
(h) What is a symbol table ? Which data
structure is most suitable to represent
symbol table and Why ?
(i) What is path matrix of a Graph ? Discuss
with relevent example.
(j) What is the process of topological sorting?
Explain how time complexity of topological
sorting algorithm, depends on the data
structure used to represent the graph.
2. (a) Why do you have to check the full and
empty conditions of a STACK ? Write a
C program to perform insertion and
deletion in STACK that implemented using
an array. 5
(b) Write a C program to convert a singly
linked list to circular linked list. Why
header node is used in circular list ?
5
BCSE 3102 / PCS 1001/PCS 1002 3 P.T.O.
3. (a) Define linear queue. Let QUEUE be a
nonempty Queue implemented using
linear array. Write a C program to delete
m elements from the QUEUE. 5
(b) Sketch the binary search tree resulting
from the insertion of the following integer
keys: 39, 24, 12, 11, 43, 73, 26, 35, 29,
13, 6 5
(i) Is the tree almost complete ?
(ii) Is the tree a AVL ?
(iii) What is the height of the sketched
tree ?
(iv) Write the PREORDER traversal of
the sketched tree.
4. (a) Write an algorithm that computes the
number of elements and sum of elements
in a linear linked list. 5
BCSE 3102 / PCS 1001/PCS 1002 4 Contd.
(b) The in-order traversal of a tree produced
the sequence D, B, H, E, A, I, F, J, C,
G and the pre-order traversal of the
same tree produced A, B, D, E, H, C, F,
I, J, G. Draw the binary tree. Give a
linear array representation of the above
binary tree. Define a Node structure in
C, which can be used to implement a
tree. 5
5. (a) Describe a node structure of a doubly
linked list. Write an algorithm to delete
the last node of a non-empty doubly
linked list. 5
(b) Define binary Heap. Explain the process
of Heap sort. Write an general algorithm
to construct a min heap. Construct min-
heap from the following list.
{ 21, 6, 56, 61, 44, 7, 9, 76, 75, 32, 34,
4, 49, 33 } 5
6. (a) Define a Graph. What are the different
representations of a Graph ? Use suitable
data structures to represent the following
directed graph in memory. 5
(b) What are the preconditions to perorm
BINARY SEARCH on a linear array ?
Write a recursive function in C to
perform binary search on a linear array.
5
BCSE 3102 / PCS 1001/PCS 1002 5 P.T.O. BCSE 3102 / PCS 1001/PCS 1002 6 Contd.
D
A
E
G
H
F
I
CB
7. (a) Write an algorithm to perform DFS on a
graph. Find out the path from D to K
using DFS. 5
(b) Write a program in C to sort a list of
floating point numbers (stored in a linear
array) using quick sort. In quick sort, why
the pivot is chosen from the center of the
list rather than from one end ? 5
BCSE 3102 / PCS 1001/PCS 1002 7 P.T.O.
8. (a) Use linked list to represent the following
polynomial
P (x, y, z) = 2xy2
z3
+ 3x2
yz2
+ 4xy3
z +
5x2
y2
+ 8xy2
z5
+ 19 2.5
(b) Describe the data structure used to
represent a General tree. 2.5
(c) Define circular queue. Sketch to explain
the placement of FORNT and REAR
pointers when Queue is Full and Queue
Containing single element. 2.5
(d) Covert the following infix expression to post
fix expression using STACK 2.5
(C – D ) + (E AF) + F / (H + W) * A AB.
––––––––––
BCSE 3102 / PCS 1001/PCS 1002 8 – C
D
A
C
E
J
H
K
GB
I
M
F
L

More Related Content

What's hot

Data Structures (CS8391)
Data Structures (CS8391)Data Structures (CS8391)
Data Structures (CS8391)Elavarasi K
 
Data structure and its types
Data structure and its typesData structure and its types
Data structure and its typesNavtar Sidhu Brar
 
Data structure and its types
Data structure and its typesData structure and its types
Data structure and its typesNavtar Sidhu Brar
 
Introduction to Data Structure
Introduction to Data Structure Introduction to Data Structure
Introduction to Data Structure Prof Ansari
 
Data structure,abstraction,abstract data type,static and dynamic,time and spa...
Data structure,abstraction,abstract data type,static and dynamic,time and spa...Data structure,abstraction,abstract data type,static and dynamic,time and spa...
Data structure,abstraction,abstract data type,static and dynamic,time and spa...Hassan Ahmed
 
Unit 1 introduction to data structure
Unit 1   introduction to data structureUnit 1   introduction to data structure
Unit 1 introduction to data structurekalyanineve
 
Data structures Basics
Data structures BasicsData structures Basics
Data structures BasicsDurgaDeviCbit
 
Introduction to data structure
Introduction to data structure Introduction to data structure
Introduction to data structure NUPOORAWSARMOL
 
Introduction of data structures and algorithms
Introduction of data structures and algorithmsIntroduction of data structures and algorithms
Introduction of data structures and algorithmsVinayKumarV16
 
Introduction to data_structure
Introduction to data_structureIntroduction to data_structure
Introduction to data_structureAshim Lamichhane
 
2nd puc computer science chapter 3 data structures 1
2nd puc computer science chapter 3 data structures 12nd puc computer science chapter 3 data structures 1
2nd puc computer science chapter 3 data structures 1Aahwini Esware gowda
 
Data structure lecture 2
Data structure lecture 2Data structure lecture 2
Data structure lecture 2Kumar
 
Data structures (introduction)
 Data structures (introduction) Data structures (introduction)
Data structures (introduction)Arvind Devaraj
 
Data structure & its types
Data structure & its typesData structure & its types
Data structure & its typesRameesha Sadaqat
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithmsHoang Nguyen
 

What's hot (20)

Data structure
Data structureData structure
Data structure
 
Data Structures (CS8391)
Data Structures (CS8391)Data Structures (CS8391)
Data Structures (CS8391)
 
Data Structures (BE)
Data Structures (BE)Data Structures (BE)
Data Structures (BE)
 
Data structure and its types
Data structure and its typesData structure and its types
Data structure and its types
 
Data structure and its types
Data structure and its typesData structure and its types
Data structure and its types
 
Introduction to Data Structure
Introduction to Data Structure Introduction to Data Structure
Introduction to Data Structure
 
Data structure,abstraction,abstract data type,static and dynamic,time and spa...
Data structure,abstraction,abstract data type,static and dynamic,time and spa...Data structure,abstraction,abstract data type,static and dynamic,time and spa...
Data structure,abstraction,abstract data type,static and dynamic,time and spa...
 
Unit 1 introduction to data structure
Unit 1   introduction to data structureUnit 1   introduction to data structure
Unit 1 introduction to data structure
 
Data structures Basics
Data structures BasicsData structures Basics
Data structures Basics
 
Introduction to data structure
Introduction to data structure Introduction to data structure
Introduction to data structure
 
Lecture 2a arrays
Lecture 2a arraysLecture 2a arrays
Lecture 2a arrays
 
Introduction of data structures and algorithms
Introduction of data structures and algorithmsIntroduction of data structures and algorithms
Introduction of data structures and algorithms
 
Introduction to data_structure
Introduction to data_structureIntroduction to data_structure
Introduction to data_structure
 
2nd puc computer science chapter 3 data structures 1
2nd puc computer science chapter 3 data structures 12nd puc computer science chapter 3 data structures 1
2nd puc computer science chapter 3 data structures 1
 
Data structures
Data structuresData structures
Data structures
 
Data structure lecture 2
Data structure lecture 2Data structure lecture 2
Data structure lecture 2
 
Data structures (introduction)
 Data structures (introduction) Data structures (introduction)
Data structures (introduction)
 
Data structures
Data structuresData structures
Data structures
 
Data structure & its types
Data structure & its typesData structure & its types
Data structure & its types
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithms
 

Similar to Data structure using c bcse 3102 pcs 1002

Data structures question paper anna university
Data structures question paper anna universityData structures question paper anna university
Data structures question paper anna universitysangeethajames07
 
Ec2203 digital electronics questions anna university by www.annaunivedu.org
Ec2203 digital electronics questions anna university by www.annaunivedu.orgEc2203 digital electronics questions anna university by www.annaunivedu.org
Ec2203 digital electronics questions anna university by www.annaunivedu.organnaunivedu
 
Gate Previous Years Papers
Gate Previous Years PapersGate Previous Years Papers
Gate Previous Years PapersRahul Jain
 
Redo midterm
Redo midtermRedo midterm
Redo midtermIIUM
 
Ds qb 2021 rma
Ds qb 2021 rmaDs qb 2021 rma
Ds qb 2021 rmaARAVINDRM2
 
AP PGECET Computer Science 2016 question paper
AP PGECET Computer Science 2016 question paperAP PGECET Computer Science 2016 question paper
AP PGECET Computer Science 2016 question paperEneutron
 
C programming & data structure
C programming & data structureC programming & data structure
C programming & data structurerajeev_123
 
ASP.NET With C# (December – 2017) [Revised Syllabus | Question Paper]
ASP.NET With C# (December – 2017) [Revised Syllabus | Question Paper]ASP.NET With C# (December – 2017) [Revised Syllabus | Question Paper]
ASP.NET With C# (December – 2017) [Revised Syllabus | Question Paper]Mumbai B.Sc.IT Study
 

Similar to Data structure using c bcse 3102 pcs 1002 (20)

3rd Semester Computer Science and Engineering (ACU-2022) Question papers
3rd Semester Computer Science and Engineering  (ACU-2022) Question papers3rd Semester Computer Science and Engineering  (ACU-2022) Question papers
3rd Semester Computer Science and Engineering (ACU-2022) Question papers
 
Data structures question paper anna university
Data structures question paper anna universityData structures question paper anna university
Data structures question paper anna university
 
Ec2203 digital electronics questions anna university by www.annaunivedu.org
Ec2203 digital electronics questions anna university by www.annaunivedu.orgEc2203 digital electronics questions anna university by www.annaunivedu.org
Ec2203 digital electronics questions anna university by www.annaunivedu.org
 
Cs 64
Cs 64Cs 64
Cs 64
 
Cs 62
Cs 62Cs 62
Cs 62
 
3rd Semester Computer Science and Engineering (ACU) Question papers
3rd Semester Computer Science and Engineering  (ACU) Question papers3rd Semester Computer Science and Engineering  (ACU) Question papers
3rd Semester Computer Science and Engineering (ACU) Question papers
 
Gate Previous Years Papers
Gate Previous Years PapersGate Previous Years Papers
Gate Previous Years Papers
 
Gate-Cs 1996
Gate-Cs 1996Gate-Cs 1996
Gate-Cs 1996
 
Cs101 endsem 2014
Cs101 endsem 2014Cs101 endsem 2014
Cs101 endsem 2014
 
Paper
PaperPaper
Paper
 
C g.2010 supply
C g.2010 supplyC g.2010 supply
C g.2010 supply
 
Redo midterm
Redo midtermRedo midterm
Redo midterm
 
Ds qb 2021 rma
Ds qb 2021 rmaDs qb 2021 rma
Ds qb 2021 rma
 
AP PGECET Computer Science 2016 question paper
AP PGECET Computer Science 2016 question paperAP PGECET Computer Science 2016 question paper
AP PGECET Computer Science 2016 question paper
 
Gate-Cs 2010
Gate-Cs 2010Gate-Cs 2010
Gate-Cs 2010
 
Adobe
AdobeAdobe
Adobe
 
2nd Semester M Tech: Computer Science and Engineering (Jun-2016) Question Pa...
2nd  Semester M Tech: Computer Science and Engineering (Jun-2016) Question Pa...2nd  Semester M Tech: Computer Science and Engineering (Jun-2016) Question Pa...
2nd Semester M Tech: Computer Science and Engineering (Jun-2016) Question Pa...
 
C programming & data structure
C programming & data structureC programming & data structure
C programming & data structure
 
ASP.NET With C# (December – 2017) [Revised Syllabus | Question Paper]
ASP.NET With C# (December – 2017) [Revised Syllabus | Question Paper]ASP.NET With C# (December – 2017) [Revised Syllabus | Question Paper]
ASP.NET With C# (December – 2017) [Revised Syllabus | Question Paper]
 
Gate-Cs 2007
Gate-Cs 2007Gate-Cs 2007
Gate-Cs 2007
 

More from SANTOSH RATH

Lesson plan proforma database management system
Lesson plan proforma database management systemLesson plan proforma database management system
Lesson plan proforma database management systemSANTOSH RATH
 
Lesson plan proforma progrmming in c
Lesson plan proforma progrmming in cLesson plan proforma progrmming in c
Lesson plan proforma progrmming in cSANTOSH RATH
 
Expected questions tc
Expected questions tcExpected questions tc
Expected questions tcSANTOSH RATH
 
Expected questions tc
Expected questions tcExpected questions tc
Expected questions tcSANTOSH RATH
 
Module wise format oops questions
Module wise format oops questionsModule wise format oops questions
Module wise format oops questionsSANTOSH RATH
 
( Becs 2208 ) database management system
( Becs 2208 ) database management system( Becs 2208 ) database management system
( Becs 2208 ) database management systemSANTOSH RATH
 
Expected Questions TC
Expected Questions TCExpected Questions TC
Expected Questions TCSANTOSH RATH
 
Expected questions tc
Expected questions tcExpected questions tc
Expected questions tcSANTOSH RATH
 
Expected questions for dbms
Expected questions for dbmsExpected questions for dbms
Expected questions for dbmsSANTOSH RATH
 
Expected questions for dbms
Expected questions for dbmsExpected questions for dbms
Expected questions for dbmsSANTOSH RATH
 
Oops model question
Oops model questionOops model question
Oops model questionSANTOSH RATH
 
System programming note
System programming noteSystem programming note
System programming noteSANTOSH RATH
 
Operating system notes
Operating system notesOperating system notes
Operating system notesSANTOSH RATH
 

More from SANTOSH RATH (20)

Lesson plan proforma database management system
Lesson plan proforma database management systemLesson plan proforma database management system
Lesson plan proforma database management system
 
Lesson plan proforma progrmming in c
Lesson plan proforma progrmming in cLesson plan proforma progrmming in c
Lesson plan proforma progrmming in c
 
Expected questions tc
Expected questions tcExpected questions tc
Expected questions tc
 
Expected questions tc
Expected questions tcExpected questions tc
Expected questions tc
 
Module wise format oops questions
Module wise format oops questionsModule wise format oops questions
Module wise format oops questions
 
2011dbms
2011dbms2011dbms
2011dbms
 
2006dbms
2006dbms2006dbms
2006dbms
 
( Becs 2208 ) database management system
( Becs 2208 ) database management system( Becs 2208 ) database management system
( Becs 2208 ) database management system
 
Rdbms2010
Rdbms2010Rdbms2010
Rdbms2010
 
Expected Questions TC
Expected Questions TCExpected Questions TC
Expected Questions TC
 
Expected questions tc
Expected questions tcExpected questions tc
Expected questions tc
 
Expected questions for dbms
Expected questions for dbmsExpected questions for dbms
Expected questions for dbms
 
Expected questions for dbms
Expected questions for dbmsExpected questions for dbms
Expected questions for dbms
 
Oops model question
Oops model questionOops model question
Oops model question
 
System programming note
System programming noteSystem programming note
System programming note
 
Operating system notes
Operating system notesOperating system notes
Operating system notes
 
Os notes
Os notesOs notes
Os notes
 
OS ASSIGNMENT 2
OS ASSIGNMENT 2OS ASSIGNMENT 2
OS ASSIGNMENT 2
 
OS ASSIGNMENT-1
OS ASSIGNMENT-1OS ASSIGNMENT-1
OS ASSIGNMENT-1
 
OS ASSIGNMENT 3
OS ASSIGNMENT 3OS ASSIGNMENT 3
OS ASSIGNMENT 3
 

Recently uploaded

University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...SUHANI PANDEY
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdfSuman Jyoti
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 

Recently uploaded (20)

Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 

Data structure using c bcse 3102 pcs 1002

  • 1. Totalnumberof printedpages– 8 B. Tech / MCA BCSE3102/ PCS 1001/PCS1002 Second Semester Examination – 2008 DATA STRUCTURE USING C Full Marks – 70 Time : 3 Hours Answer Question No. 1 which is compulsory and any five from the rest. Figures in the right hand margin indicate marks. 1. Answer the following questions : 2×10 (a) Define data structure. What do you mean by ADT ? Define and differentiate between linear and non-linear data structures. (b) State applications for which binary tree is most suitable. Explain representation of binary tree in linear array. (c) Describe ADT representation of queue with commonly used functions. (d) Write the conditions to test ‘‘Queue is Empty’’, ‘‘Queue is Full’’, and ‘‘Queue Contains ≥ 1’’ for a linear queue imple- mented in linear array. (e) Explain the data structure used to repre- sent a sparse matrix. (f) Why do you have to check the full and empty conditions of a STACK (imple- mented in linear array) ? (g) Define with example Height Balance Tree. What is the worst cases height of such tree ? P.T.O. BCSE 3102 / PCS 1001/PCS 1002 2 Contd.
  • 2. (h) What is a symbol table ? Which data structure is most suitable to represent symbol table and Why ? (i) What is path matrix of a Graph ? Discuss with relevent example. (j) What is the process of topological sorting? Explain how time complexity of topological sorting algorithm, depends on the data structure used to represent the graph. 2. (a) Why do you have to check the full and empty conditions of a STACK ? Write a C program to perform insertion and deletion in STACK that implemented using an array. 5 (b) Write a C program to convert a singly linked list to circular linked list. Why header node is used in circular list ? 5 BCSE 3102 / PCS 1001/PCS 1002 3 P.T.O. 3. (a) Define linear queue. Let QUEUE be a nonempty Queue implemented using linear array. Write a C program to delete m elements from the QUEUE. 5 (b) Sketch the binary search tree resulting from the insertion of the following integer keys: 39, 24, 12, 11, 43, 73, 26, 35, 29, 13, 6 5 (i) Is the tree almost complete ? (ii) Is the tree a AVL ? (iii) What is the height of the sketched tree ? (iv) Write the PREORDER traversal of the sketched tree. 4. (a) Write an algorithm that computes the number of elements and sum of elements in a linear linked list. 5 BCSE 3102 / PCS 1001/PCS 1002 4 Contd.
  • 3. (b) The in-order traversal of a tree produced the sequence D, B, H, E, A, I, F, J, C, G and the pre-order traversal of the same tree produced A, B, D, E, H, C, F, I, J, G. Draw the binary tree. Give a linear array representation of the above binary tree. Define a Node structure in C, which can be used to implement a tree. 5 5. (a) Describe a node structure of a doubly linked list. Write an algorithm to delete the last node of a non-empty doubly linked list. 5 (b) Define binary Heap. Explain the process of Heap sort. Write an general algorithm to construct a min heap. Construct min- heap from the following list. { 21, 6, 56, 61, 44, 7, 9, 76, 75, 32, 34, 4, 49, 33 } 5 6. (a) Define a Graph. What are the different representations of a Graph ? Use suitable data structures to represent the following directed graph in memory. 5 (b) What are the preconditions to perorm BINARY SEARCH on a linear array ? Write a recursive function in C to perform binary search on a linear array. 5 BCSE 3102 / PCS 1001/PCS 1002 5 P.T.O. BCSE 3102 / PCS 1001/PCS 1002 6 Contd. D A E G H F I CB
  • 4. 7. (a) Write an algorithm to perform DFS on a graph. Find out the path from D to K using DFS. 5 (b) Write a program in C to sort a list of floating point numbers (stored in a linear array) using quick sort. In quick sort, why the pivot is chosen from the center of the list rather than from one end ? 5 BCSE 3102 / PCS 1001/PCS 1002 7 P.T.O. 8. (a) Use linked list to represent the following polynomial P (x, y, z) = 2xy2 z3 + 3x2 yz2 + 4xy3 z + 5x2 y2 + 8xy2 z5 + 19 2.5 (b) Describe the data structure used to represent a General tree. 2.5 (c) Define circular queue. Sketch to explain the placement of FORNT and REAR pointers when Queue is Full and Queue Containing single element. 2.5 (d) Covert the following infix expression to post fix expression using STACK 2.5 (C – D ) + (E AF) + F / (H + W) * A AB. –––––––––– BCSE 3102 / PCS 1001/PCS 1002 8 – C D A C E J H K GB I M F L