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

Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
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
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 

Recently uploaded (20)

Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.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
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 

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