Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Data structures and algorithms

Rating
-
Sold
-
Pages
21
Uploaded on
29-04-2023
Written in
2022/2023

Its all about data structures and algorithms

Institution
Course

Content preview

DATA STRUCTURE http://www.youtube.com/c/EDULINEFORCS
STUDENT




MODULE 3
LINKED LIST & MEMORY
MANAGEMENT



Prepared By Mr. EBIN PM, AP, IESCE 1




SELF REFERENTIAL STRUCTURE
• Self Referential Structure is the Data Structure in which the pointer
refers (points) to the structure of the same type.
• In other words, structures pointing to the same type of structures
are self-referential in nature.
• A self referential structure is used to create data structures like
linked lists, tree, graph etc.




Prepared By Mr.EBIN PM, AP, IESCE EDULINE 2




Prepared By Mr. EBIN PM, AP, IESCE

,DATA STRUCTURE http://www.youtube.com/c/EDULINEFORCS
STUDENT




Eg: In singly linked list




• In the above declaration next is the pointer to the structure of type
node. Here next is the pointer which will contains the address of
the structure of the same type (i.e address of next node) and data
will contain the actual data.




Prepared By Mr.EBIN PM, AP, IESCE EDULINE 3




Eg: In Doubly linked list




• In the above declaration prev & next are the pointer to the
structure of type node. Here prev pointer contains the address of
the previous node and next pointer contains the address of the
next node.




Prepared By Mr.EBIN PM, AP, IESCE EDULINE 4




Prepared By Mr. EBIN PM, AP, IESCE

, DATA STRUCTURE http://www.youtube.com/c/EDULINEFORCS
STUDENT




DYNAMIC MEMORY ALLOCATION
Memory Allocation Process
• Global variables, static variables and program instructions get their
memory in permanent storage area whereas local variables are
stored in a memory area called Stack.
• The memory space between these two region is known as Heap
area. This region is used for dynamic memory allocation during
execution of the program. The size of heap keep changing.
• The process of allocating memory at runtime is known as dynamic
memory allocation. Library routines known as memory
management functions are used for allocating and freeing memory
during execution of a program.

Prepared By Mr.EBIN PM, AP, IESCE EDULINE 5




Program memory layout




Prepared By Mr.EBIN PM, AP, IESCE EDULINE 6




Prepared By Mr. EBIN PM, AP, IESCE

Written for

Institution
Course

Document information

Uploaded on
April 29, 2023
Number of pages
21
Written in
2022/2023
Type
Class notes
Professor(s)
Ebin
Contains
All classes

Subjects

$8.89
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
adharshwork40

Get to know the seller

Seller avatar
adharshwork40 MET'S School of Engineering
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
7
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions