SlideShare a Scribd company logo
Chapter 22
Custom Generic Data Structures
Mrs. L. Priya Head & Assistant Professor Sri Kaliswari College (Autonomous)
Generic
Data
Structures
01
02
03
04
SELF REFERENTIAL CLASSES
DYNAMIC MEMORY
ALLOCATION
LINKED LISTS
STACKS
SELF REFERENTIAL
CLASSES
Agenda Style
SELFREFERENTIAL
CLASSES
Contains an instance variable that refers to another object of
the same class
Example
Class Node <T>
{
T data;
Node (T data) { /* constructor Body */ }
void setData(T data) { }
void getData( ) { }
void setNext (Node <T> next) { }
Node <T > getNext() { }
}
DYNAMIC MEMORY
ALLOCATION
Agenda Style
DYNAMICMEMORY
ALLOCATION
Creating and Maintaining dynamic data structures requires
Dynamic Memory Allocation.
Obtaining memory space at execution time – for new node.
Releasing space – no longer needed.
Java performs automatic garbage collection of objects – no longer
referenced.
Insufficient Memory – OutOfMemoryError is Thrown.
LINKED LISTS
Agenda Style
LINKEDLISTS Creating and Maintaining dynamic data structures requires
Dynamic Memory Allocation.
Obtaining memory space at execution time – for new node.
Releasing space – no longer needed.
Java performs automatic garbage collection of objects – no longer
referenced.
Insufficient Memory – OutOfMemoryError is Thrown.
Agenda Style
LINKEDLISTS
Assignment – 1
Generic Linked List Program in Page No : 908 – 912.
Expected Presentation
•Explanation for each line
•Execution Step for set of input
STACKS
Agenda Style
STACKS LIFO data structure
New nodes can be added and removed from only at the top.
Link member in the bottom node – null
Primary Methods – push and pop
Agenda Style
STACKS
Assignment – 1
Generic Stack Program in Page No : 918 - 920
Expected Presentation
•Explanation for each line
•Execution Step for set of input
Any Queries ?

More Related Content

PDF
Classification using Apache SystemML by Prithviraj Sen
Arvind Surve
 
PPTX
Classes,object and methods jav
Padma Kannan
 
PPT
Softwear presentation
Alina Asif
 
PDF
A tree kernel based approach for clone detection
ICSM 2010
 
PPTX
Adbms 11 object structure and type constructor
Vaibhav Khanna
 
PPTX
La sql
James Johnson
 
PPTX
Entity Framework Database and Code First
James Johnson
 
PPTX
Unit - IV (1).pptx
VaishnaviGaikwad67
 
Classification using Apache SystemML by Prithviraj Sen
Arvind Surve
 
Classes,object and methods jav
Padma Kannan
 
Softwear presentation
Alina Asif
 
A tree kernel based approach for clone detection
ICSM 2010
 
Adbms 11 object structure and type constructor
Vaibhav Khanna
 
Entity Framework Database and Code First
James Johnson
 
Unit - IV (1).pptx
VaishnaviGaikwad67
 

Similar to Chapter 22 custom generic data structure (20)

PPTX
Unit - IV.pptx
VaishnaviGaikwad67
 
PPTX
05 entity framework
glubox
 
PPTX
UNIT - IIInew.pptx
akila m
 
PPTX
MIT302 Lesson 2_Advanced Database Systems.pptx
elsagalgao
 
DOCX
Object oriented programming tutorial
Ghulam Abbas Khan
 
PDF
inf5750---lecture-2.-c---hibernate-intro.pdf
bhqckkgwglxjcuctdf
 
PPT
Booa8 Slide 04
oswchavez
 
PPTX
Module 6 : Essentials of Object Oriented Programming
Prem Kumar Badri
 
PPT
Data structure and problem solving ch01.ppt
Ping261512
 
PPTX
Mdst3559 2011-04-26-viz1
Rafael Alvarado
 
PPT
Object Oriented Programming In .Net
Greg Sohl
 
PPTX
Unit ii
donny101
 
PPTX
C# classes objects
Dr.Neeraj Kumar Pandey
 
PDF
System_Verilog_OOPS_Concepts.pdf
Poothan
 
PPT
packages and interfaces
madhavi patil
 
PPT
Introduction to odbms
ajay pashankar
 
PPTX
Modeling- Object, Dynamic and Functional
Rajani Bhandari
 
PPT
Chap01
Jotham Gadot
 
PPT
CS124-L1-OOP.ppt
MonishaAb1
 
PPTX
Introduction to Object Oriented Programing.pptx
abdurrehmanafridi21
 
Unit - IV.pptx
VaishnaviGaikwad67
 
05 entity framework
glubox
 
UNIT - IIInew.pptx
akila m
 
MIT302 Lesson 2_Advanced Database Systems.pptx
elsagalgao
 
Object oriented programming tutorial
Ghulam Abbas Khan
 
inf5750---lecture-2.-c---hibernate-intro.pdf
bhqckkgwglxjcuctdf
 
Booa8 Slide 04
oswchavez
 
Module 6 : Essentials of Object Oriented Programming
Prem Kumar Badri
 
Data structure and problem solving ch01.ppt
Ping261512
 
Mdst3559 2011-04-26-viz1
Rafael Alvarado
 
Object Oriented Programming In .Net
Greg Sohl
 
Unit ii
donny101
 
C# classes objects
Dr.Neeraj Kumar Pandey
 
System_Verilog_OOPS_Concepts.pdf
Poothan
 
packages and interfaces
madhavi patil
 
Introduction to odbms
ajay pashankar
 
Modeling- Object, Dynamic and Functional
Rajani Bhandari
 
Chap01
Jotham Gadot
 
CS124-L1-OOP.ppt
MonishaAb1
 
Introduction to Object Oriented Programing.pptx
abdurrehmanafridi21
 
Ad

Recently uploaded (20)

PDF
High Ground Student Revision Booklet Preview
jpinnuck
 
DOCX
Action Plan_ARAL PROGRAM_ STAND ALONE SHS.docx
Levenmartlacuna1
 
PDF
Electricity-Magnetic-and-Heating-Effects 4th Chapter/8th-science-curiosity.pd...
Sandeep Swamy
 
PPTX
Skill Development Program For Physiotherapy Students by SRY.pptx
Prof.Dr.Y.SHANTHOSHRAJA MPT Orthopedic., MSc Microbiology
 
PPTX
NOI Hackathon - Summer Edition - GreenThumber.pptx
MartinaBurlando1
 
PPTX
Understanding operators in c language.pptx
auteharshil95
 
PPTX
Nursing Management of Patients with Disorders of Ear, Nose, and Throat (ENT) ...
RAKESH SAJJAN
 
PDF
2.Reshaping-Indias-Political-Map.ppt/pdf/8th class social science Exploring S...
Sandeep Swamy
 
PPTX
How to Manage Global Discount in Odoo 18 POS
Celine George
 
PPTX
How to Manage Leads in Odoo 18 CRM - Odoo Slides
Celine George
 
PDF
What is CFA?? Complete Guide to the Chartered Financial Analyst Program
sp4989653
 
PDF
Review of Related Literature & Studies.pdf
Thelma Villaflores
 
PPTX
Information Texts_Infographic on Forgetting Curve.pptx
Tata Sevilla
 
PPTX
family health care settings home visit - unit 6 - chn 1 - gnm 1st year.pptx
Priyanshu Anand
 
PDF
PG-BPSDMP 2 TAHUN 2025PG-BPSDMP 2 TAHUN 2025.pdf
AshifaRamadhani
 
PPTX
Open Quiz Monsoon Mind Game Prelims.pptx
Sourav Kr Podder
 
PPT
Python Programming Unit II Control Statements.ppt
CUO VEERANAN VEERANAN
 
PPTX
Care of patients with elImination deviation.pptx
AneetaSharma15
 
PPTX
HISTORY COLLECTION FOR PSYCHIATRIC PATIENTS.pptx
PoojaSen20
 
PDF
Module 3: Health Systems Tutorial Slides S2 2025
Jonathan Hallett
 
High Ground Student Revision Booklet Preview
jpinnuck
 
Action Plan_ARAL PROGRAM_ STAND ALONE SHS.docx
Levenmartlacuna1
 
Electricity-Magnetic-and-Heating-Effects 4th Chapter/8th-science-curiosity.pd...
Sandeep Swamy
 
Skill Development Program For Physiotherapy Students by SRY.pptx
Prof.Dr.Y.SHANTHOSHRAJA MPT Orthopedic., MSc Microbiology
 
NOI Hackathon - Summer Edition - GreenThumber.pptx
MartinaBurlando1
 
Understanding operators in c language.pptx
auteharshil95
 
Nursing Management of Patients with Disorders of Ear, Nose, and Throat (ENT) ...
RAKESH SAJJAN
 
2.Reshaping-Indias-Political-Map.ppt/pdf/8th class social science Exploring S...
Sandeep Swamy
 
How to Manage Global Discount in Odoo 18 POS
Celine George
 
How to Manage Leads in Odoo 18 CRM - Odoo Slides
Celine George
 
What is CFA?? Complete Guide to the Chartered Financial Analyst Program
sp4989653
 
Review of Related Literature & Studies.pdf
Thelma Villaflores
 
Information Texts_Infographic on Forgetting Curve.pptx
Tata Sevilla
 
family health care settings home visit - unit 6 - chn 1 - gnm 1st year.pptx
Priyanshu Anand
 
PG-BPSDMP 2 TAHUN 2025PG-BPSDMP 2 TAHUN 2025.pdf
AshifaRamadhani
 
Open Quiz Monsoon Mind Game Prelims.pptx
Sourav Kr Podder
 
Python Programming Unit II Control Statements.ppt
CUO VEERANAN VEERANAN
 
Care of patients with elImination deviation.pptx
AneetaSharma15
 
HISTORY COLLECTION FOR PSYCHIATRIC PATIENTS.pptx
PoojaSen20
 
Module 3: Health Systems Tutorial Slides S2 2025
Jonathan Hallett
 
Ad

Chapter 22 custom generic data structure