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

Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...Call girls in Ahmedabad High profile
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...ranjana rawat
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxhumanexperienceaaa
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 

Recently uploaded (20)

Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptxthe ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
the ladakh protest in leh ladakh 2024 sonam wangchuk.pptx
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
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
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 

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