How To Represent Trees and Graphs in Code | Adjacency Matrix & List | CP Course | EP 69

  Рет қаралды 92,335

Luv

Luv

Күн бұрын

Graph/Trees Playlist : • Graph & Trees Course
ALL CP/DSA RESOURCES : linktr.ee/iamluv
FREE COMPETITIVE PROGRAMMING COURSE PLAYLIST : • Competitive Programmin...
In this videos I explain How you can represent Tree/Graph in Code using Adjacency matrix or Adjacency list
Timestamps:
Adjacency Matrix: 0:00
Adjacecny List: 11:06
Be a part of our awesome Community. Join
○ Discord : / discord
○ Telegram : t.me/LuvIsMeYT
You can follow me on below platforms for all the latest updates
○ Instagram : / i._m_.luv
○ Twitter : / luvk1412
○ Linkedin : / luvk1412
Blog(Not frequently updated)
○ Blog : www.codewithluv.in
Hashtags
#adjacency #matrix #list #graph

Пікірлер: 470
@rishabhverma7730
@rishabhverma7730 2 жыл бұрын
💛💛💛 1. In cp mostly the vertices are 1 based. 2. Most of the question are done by DFS 3. You can also use the vector of vector as an alternative.
@mahdi-hasan
@mahdi-hasan Жыл бұрын
Thank you. Shouldn't we use Nodes like linked list to represent graphs/trees?
@rishantkumar2408
@rishantkumar2408 2 жыл бұрын
Plz add "aisa kuch khaas nahi hai , bas aise hii naam de diya hai" ... It has special effect.... 💛💛💛
@falcon4359
@falcon4359 2 жыл бұрын
Your explainations are amazing, you always seem to know and care aboout the minute details I aspire to be as skilled as that 💛💛💛
@binary6208
@binary6208 2 жыл бұрын
Aap pdhate ho to poora 100% samajh me aata hai expecting much in this graph/tree series
@amisha2545
@amisha2545 2 жыл бұрын
🔥your explanations are incredible. you are so underrated tbh. This graph series is better than striver’s graph series tbh.
@ShyToSassySaga
@ShyToSassySaga 2 жыл бұрын
You are a great teacher.Thank you so much
@arifmulani7130
@arifmulani7130 Жыл бұрын
💛 The course to rule them all !!
@mycourse1551
@mycourse1551 Жыл бұрын
While creating the adjacency list should'nt it be: vector graph2;
@parthkabra8880
@parthkabra8880 2 жыл бұрын
Thanks for the bit manipulation one
@pavans3283
@pavans3283 2 жыл бұрын
amazing to the point loved it 💛
@aniketpawar9207
@aniketpawar9207 2 жыл бұрын
easy and simple explanation given by luv thanks
@yugal8627
@yugal8627 2 жыл бұрын
💛💛💛💛💛💛💛 Thanks, Luv U are a wonderful teacher. You teach the very confusing concepts very easily. I'll wait for more such vdo from U.
@sawvikdipto3087
@sawvikdipto3087 Жыл бұрын
Your explanation is awesome, Thank you .
@abirpal501
@abirpal501 2 жыл бұрын
17:10 vector graph2[N] 💛💛💛💛💛
@kunalprajapati5959
@kunalprajapati5959 2 жыл бұрын
we will take vector of pair, i.e vector
@gouravkumarshaw5467
@gouravkumarshaw5467 Жыл бұрын
Awesome Explanation Thanks!!!!!😇
@rumar1071
@rumar1071 2 жыл бұрын
You r the most underrated ds tutor i think
@naha_ne_ja_nahane
@naha_ne_ja_nahane 2 жыл бұрын
You deserve more subscriber 🔥🔥
@ytg6663
@ytg6663 2 жыл бұрын
Most*
@utkarshgautam1940
@utkarshgautam1940 2 жыл бұрын
love to see u bhaii,keep making vedioes,u are awsome,we need pepole like u
@muhafijnaikawadi4959
@muhafijnaikawadi4959 2 күн бұрын
Thank you so much!😉😉
@utkarshshukla9768
@utkarshshukla9768 2 жыл бұрын
💛💛 Clear explanation!
@chetanpatil1034
@chetanpatil1034 2 жыл бұрын
Bhiya you are a great teacher of all time please make more videos on graph
@himanshujha7919
@himanshujha7919 Ай бұрын
best #dsa #tutor and best #graph playlist............💛💛💛💛💛💛💛💛💛💛💛💛
@itsyadavraj
@itsyadavraj 2 жыл бұрын
thank you so much sir provide awesome lectures 🔥🔥
@Shubham_Kanojia_56
@Shubham_Kanojia_56 2 жыл бұрын
Best channel for cp 🔥🔥🔥
@ashikghosh6166
@ashikghosh6166 Жыл бұрын
luved this!💥💥❣❣
@mogaon9489
@mogaon9489 Жыл бұрын
💛 Thank you very much
@raghavgarg5273
@raghavgarg5273 Жыл бұрын
Awesome videos bro thanks!!
@riteshraj64
@riteshraj64 Жыл бұрын
Amazing as always 💛💛
@MukulKumar-mb6ld
@MukulKumar-mb6ld 2 жыл бұрын
osm bheya you are grate 💛💛💛
@aryanagrawal3719
@aryanagrawal3719 2 жыл бұрын
awesome man!
@shaikhmohdtehami7923
@shaikhmohdtehami7923 6 ай бұрын
💛💛 Great Explaination
@tusharyadav3834
@tusharyadav3834 Жыл бұрын
love for luv , love for cp
@Suuuuuuuuuuuuuubrat
@Suuuuuuuuuuuuuubrat 2 жыл бұрын
Your videos are awesome 💛💛💛
@_PB03
@_PB03 2 жыл бұрын
💛💛💛as always to the point :)
@sakshi-ok8zu
@sakshi-ok8zu 2 жыл бұрын
mja aa gya ~ amazing explanation!
@rickk3300
@rickk3300 2 жыл бұрын
Awesome lecture 💛
@wasifshahzad5001
@wasifshahzad5001 6 ай бұрын
vector graph[N];
@dhruvilsavani5287
@dhruvilsavani5287 2 жыл бұрын
really amazing explanations and i believe you will be uploaded more video
@collegebkchodi6687
@collegebkchodi6687 2 жыл бұрын
Luv=Love💛
@md.nurulalam6462
@md.nurulalam6462 2 жыл бұрын
💛 love you Bhai concept clear 🙂
@TataG29
@TataG29 Жыл бұрын
Thank you Sir🧡🧡
@relaxationmantra3498
@relaxationmantra3498 2 жыл бұрын
💛💛💛💛💛 ek kyu mai to bahut sare dunga..... Please jaldi jaldi graph ke videos upload kar do bhaiya.
@yashsinghal7471
@yashsinghal7471 Жыл бұрын
💛💛💛💛 really helpful
@DeepakVerma-iitbhu
@DeepakVerma-iitbhu 2 жыл бұрын
💛 thanks bhaiyya
@kalyanvivek2852
@kalyanvivek2852 Жыл бұрын
💛💛💛💛 Awesome explanation.
@mehedihasansabbir7886
@mehedihasansabbir7886 2 жыл бұрын
Thanks a lot, brother.
@kartikkalani8439
@kartikkalani8439 Жыл бұрын
Thank you 🙏
@BrijeshYadav-hr4nz
@BrijeshYadav-hr4nz 2 жыл бұрын
excellent explanation 💛
@saket61195
@saket61195 2 жыл бұрын
💛💛 beautiful explanation
@sahilanand30
@sahilanand30 2 жыл бұрын
Nicely explained
@gonfreeces5514
@gonfreeces5514 2 жыл бұрын
Great video 💛
@yuvrajagarkar8764
@yuvrajagarkar8764 Жыл бұрын
vector graph2[N]; will this line create graph2 as an array of vector ?, if so than will graph2 have all elements as empty vector initially ?
@sahilanand30
@sahilanand30 2 жыл бұрын
Best explanation
@aloo0p838
@aloo0p838 Жыл бұрын
💛💛💛 nice explanations
@itz_me_imraan02
@itz_me_imraan02 2 жыл бұрын
Plz cover LCA using binary lifting too in this course🙏💜
@srujanhere8572
@srujanhere8572 2 жыл бұрын
Great work bro 💛💛💛
@iqramueed1267
@iqramueed1267 2 жыл бұрын
you are amazing 💛
@varadacharya2802
@varadacharya2802 Жыл бұрын
♥♥♥♥ too good explanation
@amanullahkhan929
@amanullahkhan929 2 жыл бұрын
very nice explanation
@rocknapier1293
@rocknapier1293 2 жыл бұрын
👍 great explanation
@jaykumarpatel6392
@jaykumarpatel6392 8 ай бұрын
love your videos
@dhruvmehta957
@dhruvmehta957 Жыл бұрын
🧡I guessed the pair thing right.❣
@satanshuag
@satanshuag 2 жыл бұрын
Thankyou!
@JbpVlogs35
@JbpVlogs35 2 жыл бұрын
Op bro full support you bro
@freeandreliablejeeprep820
@freeandreliablejeeprep820 Жыл бұрын
thank you sir
@ani68
@ani68 2 жыл бұрын
Teaching op...💛💛
@PankajSaini-ro5yp
@PankajSaini-ro5yp 2 жыл бұрын
Tq So much Bhai ❤️
@animalsfightingclub5051
@animalsfightingclub5051 2 жыл бұрын
Very nice
@abcefg7045
@abcefg7045 2 жыл бұрын
17:08 we will create another list and store the weight there with the correct index number or we can also create map and store them, but creating vector or will be more efficient than maps or unordered maps i guess cuz we need extra space to store the index SIR PLEASE REPLY AND SAY WEATHER I AM CORRECT OR NOT ???????
@abhishekanand5078
@abhishekanand5078 2 жыл бұрын
Love you bahiya💛💛💛
@SurajKumar-ml2vb
@SurajKumar-ml2vb 2 жыл бұрын
awesome bro
@someshbhandare
@someshbhandare 2 жыл бұрын
Awesome 💛
@JambulaPavan
@JambulaPavan Ай бұрын
💛💛💛💛💛💛💛💛 luv u luv sirrrr
@chiraggoyal9646
@chiraggoyal9646 2 жыл бұрын
Thanx bhaiya
@ayushKumar-9835
@ayushKumar-9835 5 ай бұрын
Need little correction there: vectoradjList(vertices);
@magic.pencil2.0
@magic.pencil2.0 2 жыл бұрын
Bhaiya plz make other videos also Ur videos very helpful 🧡
@singh.aadarsh
@singh.aadarsh 2 жыл бұрын
Amazing toda aur visualisation kro bhai. Adjacency matrix pair of int , int visualise ni ho paya.. 💛💛💛
@pushpakchulet
@pushpakchulet Жыл бұрын
We can store pair like vector graph2[N] and store as graph[v1].push_back(make_pair(v2,wt)); graph[v2].push_back(make_pair(v1,wt))
@iSubhoo
@iSubhoo 2 жыл бұрын
Sir, 💛💛💛 for you.
@its_joel7324
@its_joel7324 2 жыл бұрын
@Luv Bro can you tell me how to print the output for the code explained... which I mean to print all that vertices and edges, their connections and if weights are provided and weights too..
@ratib4733
@ratib4733 2 жыл бұрын
nice ep number :)
@rohitchand3853
@rohitchand3853 Жыл бұрын
Very underrated 🥺
@soumojitsur5891
@soumojitsur5891 2 жыл бұрын
💛💛 we can also do this using vector...... the list representation
@ashz6744
@ashz6744 2 жыл бұрын
Nice
@srishtygoyal3675
@srishtygoyal3675 2 жыл бұрын
WATCHED TILL END💛💛💛💛
@jaydeep-p
@jaydeep-p 2 жыл бұрын
Why don't we use an array of unordered_set? Those should be faster than vectors right?
@iamdj8540
@iamdj8540 2 жыл бұрын
yellow heart ye lo heart........lol thanx for this video bro after lots of searching i got this excelent video u got a nice talent of teaching bro
@accio1107
@accio1107 2 жыл бұрын
Can you please tell or share a link of code as to how to implement graph using adj list with weights in JAVA?? (Looking at the video, which was in c++, I tried using ArrayList in Java aswell....but it says its syntactically incorrect that way. ) Kindly help me out !!
@Ayush479
@Ayush479 2 жыл бұрын
🔥🔥
@shwetasingh5405
@shwetasingh5405 2 жыл бұрын
op 🔥🔥
@sejalrai30
@sejalrai30 2 жыл бұрын
nice
@nishantsharma1042
@nishantsharma1042 2 жыл бұрын
💛 completed
@SaumitraAgrawalB22AI054
@SaumitraAgrawalB22AI054 Ай бұрын
i have a doubt ki if i would push 2 or more vertices,weights pair in any index of vector, wont it be overwritten or it would store it like a list in the index?
@holly1190
@holly1190 2 жыл бұрын
Bhaiya Graphs pura complete karaiye..plz love ur content!!!
@vasugolakiya5093
@vasugolakiya5093 2 жыл бұрын
💛!!
@utsavupadhyay1797
@utsavupadhyay1797 Жыл бұрын
pair of vertex and weight stored in index of array i.e., graph2[v1].push_back(make_pair(v2,wt)); graph2[v2].push_back(make_pair(v1,wt)); Ye bhi kr skte??
@nishcurse
@nishcurse 4 ай бұрын
kisiki video mein comment nhi karta but for luv don 💛
@rahulkadam6655
@rahulkadam6655 2 жыл бұрын
🔥🔥🔥🔝
@Nirajyadav-wu2fi
@Nirajyadav-wu2fi 2 жыл бұрын
1st day watched 3 lec
Best Toilet Gadgets and #Hacks you must try!!💩💩
00:49
Poly Holy Yow
Рет қаралды 22 МЛН
why are switch statements so HECKIN fast?
11:03
Low Level Learning
Рет қаралды 394 М.
Google Coding Interview With A High School Student
57:24
Clément Mihailescu
Рет қаралды 4,1 МЛН
COMMUNICATION SKILLS FOR BEGINNERS
12:54
Major Khushboo Patani
Рет қаралды 10 М.
25 Nooby Pandas Coding Mistakes You Should NEVER make.
11:30
Rob Mulla
Рет қаралды 265 М.
Pointers and dynamic memory - stack vs heap
17:26
mycodeschool
Рет қаралды 1,4 МЛН
Understanding and implementing a Hash Table (in C)
24:54
Jacob Sorber
Рет қаралды 347 М.
How To Implement a Graph in C. (adjacency matrix version)
20:04
Jacob Sorber
Рет қаралды 46 М.
basics of CODING in 10 minutes
15:34
The StudyTube Project
Рет қаралды 1,5 МЛН