Linked in Data structure in hindi
Linked list Kya hai
ydi kisi program ko execution ke pahle memory ko devide kiya jata hai to vah static ho jata hai aur Ese change nhi kiya jata sakta , Ek vishesh data structure jise linked list kahte hai vah flexible storage system provide karta hai jisko array ke prayog ki need nhi hoti hai stack aur queue ko computer memory me represent karne ke liye array ka use karte hai jisse memory ko pahle se declare Karna padta hai Esse memory ka wastage hota hai. Memory Ek important resource hai.ata kam se kam use me lekar more-than-more program ko run Karna chahiye
Linked list Kya hai
Ab hum janege ki linked list kya hai --Linked list ek vishesh type ke data elements ki list hoti hai jo ek-dusre se join hoti hai logical ordering har element ko next element se point karte huye represent karte hai jiske two part hote hair.
- Data Field/Information Field
- Link/Address/pointer field
Ese single linked list bhi kahte hai kyoki single linked list me bhi two part hote hai
Opetation on linked list
Linked list me basic operation ko perform kiya jata hai-
- Creation
- Deletion
- Insertion
- Traversing
- Concatenation
- Display
Creation
Yh operation linked list ko banane ke liye use me lete hai hai.jab bhi avsakta ho kisi bhi node ko list se jode diya jata hai.
Insertion
yh operation linked list me ek new node ko vishesh situation me vishesh place par jodne ke liye kaam me liya jata hai. Es new node ko nimn places par Insert kiya ja sakta hai ---
- list ke beginning me
- list ke ending me
- list ke middle me
Deletion
yh operation linked list me node ko delete karne ke liye kaam me liya jata hai.Es node ko three types se delete kiya jata hai
- list ke beginning se
- list ke ending se
- list ke middle se
Traversing
yh prakriya kisi linked list ko Ek point se dusre point tak value ko print karvane ke kaam aati hai. Agar pahle node se aakhari node ki aor traversing karte hai to yh prakriya forward traversing kahlati hai
Concatenation
yh prakriya dusre list se node ko jodne ke kaam aati hai. ydi dusri list par node hota hai to concatenation node me (m+n) node hoga.
Display
yh node pratek node ki information ko point karne ke use me lete ata information part ko print Karna hi Display operation kahlata hai
Type of linked list
linked list mukhya roop se four type ke hote hai
- Single linked list
- Doubly linked list
- Circular linked list
- Circular doubly linked list
Single linked list
Single linked list ek aisi linked list hoti hai jisme saare node ek-dusre ke sath serial me Jude rahte hai esliye Ese linear linked list bhi kahte hai. Esme ek problems yh hai ki list ke aage vale node to access kiya ja sakta hai lekin ek baar pointer ke aage Jane ke bad pichhe vale node ko access nahi kiya ja sakta hai
Syntax:- struct node { int data; struct node *next; };Doubly linked list
Doubly linked list vh linked list hoti hai jisse sare node ek-dusre ke sath multiple link ke dwara Jude hote hai eske antergat list ke aage vale node va list ke pichhe Vale node dono ko access kiya ja sakta hai esliye doubly linked list me pahle node ka left aur agle node ke right ka address rakhta hai.
Circular linked list
Circular linked list ek aisi linked list hoti hai jiski koi shuruaat va end nahi hota hai Ek single linked list ke pahle node se end node ko jode diya jata hai Ata list ke last node me list ke first node ka address rakha jata hai
Circular doubly linked list
yh ek aisi list hoti hai jisme dono pointers1()Successor pointer (2)Pre-Decessor pointer circle shape me hote hai
Click here Data Structure in Hindi
No comments