How To Represent Trees and Graphs in Code | Adjacency Matrix & List | CP Course | EP 69
Вставка
- Опубліковано 24 лип 2024
- 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
💛💛💛
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.
Thank you. Shouldn't we use Nodes like linked list to represent graphs/trees?
Plz add "aisa kuch khaas nahi hai , bas aise hii naam de diya hai" ... It has special effect.... 💛💛💛
Your explainations are amazing, you always seem to know and care aboout the minute details I aspire to be as skilled as that 💛💛💛
Aap pdhate ho to poora 100% samajh me aata hai expecting much in this graph/tree series
You deserve more subscriber 🔥🔥
Most*
🔥your explanations are incredible. you are so underrated tbh. This graph series is better than striver’s graph series tbh.
Thanks for the bit manipulation one
You are a great teacher.Thank you so much
amazing to the point loved it 💛
💛 The course to rule them all !!
17:10 vector graph2[N]
💛💛💛💛💛
💛💛💛💛💛💛💛 Thanks, Luv U are a wonderful teacher. You teach the very confusing concepts very easily. I'll wait for more such vdo from U.
Awesome Explanation Thanks!!!!!😇
Your explanation is awesome, Thank you .
You r the most underrated ds tutor i think
easy and simple explanation given by luv thanks
thank you so much sir provide awesome lectures 🔥🔥
love to see u bhaii,keep making vedioes,u are awsome,we need pepole like u
awesome man!
we will take vector of pair, i.e vector
Best channel for cp 🔥🔥🔥
😁🧡💛great course with good speed that i like most ..
luved this!💥💥❣❣
osm bheya you are grate 💛💛💛
Amazing as always 💛💛
While creating the adjacency list should'nt it be:
vector graph2;
Awesome videos bro thanks!!
💛💛 Clear explanation!
💛 love you Bhai concept clear 🙂
best #dsa #tutor and best #graph playlist............💛💛💛💛💛💛💛💛💛💛💛💛
mja aa gya ~
amazing explanation!
Bhiya you are a great teacher of all time please make more videos on graph
💛💛 Great Explaination
Your videos are awesome 💛💛💛
💛💛💛as always to the point :)
Awesome lecture 💛
Op bro full support you bro
love for luv , love for cp
💛 thanks bhaiyya
💛 Thank you very much
💛💛💛💛 really helpful
Luv=Love💛
💛💛💛💛
Awesome explanation.
🧡I guessed the pair thing right.❣
vector graph[N];
Great video 💛
Great work bro 💛💛💛
excellent explanation 💛
really amazing explanations and i believe you will be uploaded more video
💛💛💛💛💛 ek kyu mai to bahut sare dunga..... Please jaldi jaldi graph ke videos upload kar do bhaiya.
💛💛 beautiful explanation
Nicely explained
Best explanation
♥♥♥♥ too good explanation
Thank you Sir🧡🧡
👍 great explanation
you are amazing 💛
💛💛💛 nice explanations
Thanks a lot, brother.
Plz cover LCA using binary lifting too in this course🙏💜
Very nice
awesome bro
Love you bahiya💛💛💛
Awesome 💛
very nice explanation
Thank you 🙏
Teaching op...💛💛
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 ?
Thankyou!
love your videos
nice ep number :)
thank you sir
Tq So much Bhai ❤️
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
Amazing toda aur visualisation kro bhai. Adjacency matrix pair of int , int visualise ni ho paya..
💛💛💛
Very underrated 🥺
Thanx bhaiya
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 ???????
Bhaiya plz make other videos also
Ur videos very helpful 🧡
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))
WATCHED TILL END💛💛💛💛
💛💛💛💛💛💛💛💛 luv u luv sirrrr
@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..
Sir, 💛💛💛 for you.
Nice
op 🔥🔥
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?
💛 completed
Need little correction there:
vectoradjList(vertices);
💛💛
we can also do this using vector...... the list representation
🔥🔥
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 !!
Bhaiya Graphs pura complete karaiye..plz love ur content!!!
nice
Why don't we use an array of unordered_set? Those should be faster than vectors right?
💛!!
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??
kisiki video mein comment nhi karta but for luv don 💛
1st day watched 3 lec
🔥🔥🔥🔝