Can't thank you enough... I was always scared of graphs idk why let alone implementing it in C++....these videos has helped me alot to overcome that fear and now I am really comfortable with graphs...even solved a few problems on leetcode on my own.
@bsethupathi14 жыл бұрын
This video saved my life. I was breaking my head to learn graphs for a long time. Thanx Prateek. You are awesome! Prateek OP!!
@CodingBlocksIndia4 жыл бұрын
Happy to help
@peleboykulot65962 жыл бұрын
Thanks a lot!!! Im really struggling to learn graphs for a week and you just taught me graph in 8min. Dude create more tutorial like this!
@dev_casper2 ай бұрын
Thanks! Helped me understand the basics of a graph.
@abhi68533 жыл бұрын
search for this kind of video form 3 days.finally got it. Thanks
@BloodFang-j5u3 ай бұрын
your explaination is very good,loved it
@vaibhavpallod10233 жыл бұрын
wrong method of initialisation list is always dynamic so how can u initialise it again with new list .... ?????????????
@arunlabana59373 жыл бұрын
Got it. But I came here to store not only vertices and edges. I thought you will also expalin how to store weights on every edge.
@SatnamSingh-sk3hd3 жыл бұрын
when someone try to solve graph's questions, he/she don't understand the structure of graph how it will be represent apart from dfs/bfs a student havnt idea about only the traversal. in the tutorials everywhere everyone only told how to traverse the graph bfs/dfs none of the tutorials told about the adjacency list, what is that how to acces data from it, how to traverse adjacency list, when we know about the adjacency list automatically we can understand the graph. thanks man
@geovanyteca32503 жыл бұрын
a very simple explanation of a complex concept, great video !!!
@sanket7877 Жыл бұрын
Thanks a lot sir for this video. You explained the code in a simple and easy manner.
@KaranDhingra3 жыл бұрын
Loved this
@shaheenrafiq59743 жыл бұрын
Thank you so much for walking through the entire code. Helped a lot. Also thanks for doing it in English :)
@kausachan41673 жыл бұрын
what if we had A,B,C,D.... as vertices how willl be index and store?
@kapil1024IT2 жыл бұрын
again, very clear and concise
@AmitSingh-cs2hb4 жыл бұрын
Nice explanations sir👏🏻👏🏻
@gamingfingers45233 жыл бұрын
Feels a bit complicated to a beginner. Vector of an array would have been easier or even vector of Vector.
@ankitwankhede29823 жыл бұрын
Lists are much more efficient while deleting or adding vertices
@memeswallah52532 жыл бұрын
Sir for adjacency elements for loop syntax samaj ni aaya For(int x:adj[v]){ Cout
@important8026 Жыл бұрын
Thank you ❤
@dadyking12103 жыл бұрын
Very good tutorial! Thank you
@namangupta95824 жыл бұрын
Thankyou very much bhaiya it really helps me a lot.
@tombrady73903 жыл бұрын
he teaches nicely peopleonly are not paying attention then they blame him that he is teaching like reading a book.
@vamshisamineniz59054 жыл бұрын
vedio is very concise
@Hassassin563 жыл бұрын
Thank you co much !
@enjaee3 жыл бұрын
thank you for this video
@paula193352 жыл бұрын
You have no idea how happy you made me... I thought I will never understand graphs😅
@zakridouh3 жыл бұрын
Why not use a hashmap for storing the adjacency list?
@ahanmr75474 жыл бұрын
Can be use array of vectors for creating adjacency lists?
@ketanahuja89394 жыл бұрын
yeahsure
@exodus59484 жыл бұрын
@@ketanahuja8939 vector adjList[]
@anjalialmale80183 жыл бұрын
Good one. But how u write....during coding ...at right side how u explain ...means which method u have used for making video.. please tell
@uzmaahmed65474 жыл бұрын
Will you be able to show in C# please!
@saikun02934 жыл бұрын
very useful video thanks!
@CodingBlocksIndia4 жыл бұрын
Glad it was helpful!
@ironclock3 жыл бұрын
How would you go about searching through this?
@anameekasaraf33322 жыл бұрын
Sir the push_back function is not working, what should I do? I tried all ways to solve the error but all in vain. Kindly help.
@tanvir_rishad1110 ай бұрын
why you wrote Graph g(4) instead of Graph g=new Graph(4) will you kindly explain me
@ishanrajpal59753 жыл бұрын
Can anyone tell how to take user input for every vertex?
@bawavikram11134 жыл бұрын
in addEdge function, what if value of a vertex is 1000 and other verteces are 0 , 1, 2. Then size of list will be 1000. Its waste of memory. Please clarify my confusion. Thanks in advance
@gsb224 жыл бұрын
If there are 1000 vertices(nodes) and here we are assuming that graph is connected, that means each node will have atleast one neighbour which we will store at node's position list. Here 1000 would be length of main array, but lists at every index of that array wont be that long.
@atifjalal30464 жыл бұрын
Sir.....small doubt...I have studied everywhere that we cannot use sub-script operator with list...then how u are using this.......I m not understanding....🙄
@ethicalitle97704 жыл бұрын
www.cplusplus.com/reference/list/list/ you can also implement your own linked list if you want to, but c++ already has a list container in its standard library, its a doubly linked list
@jokadim3 жыл бұрын
I use Dev C++5.11 and i read the comment and change the complier to c++14 but when i run it i get no results. even if the programm ends with a 0, it prints nothing. Is there anything else to do? Thank you.
@jokadim3 жыл бұрын
ok somebody answered this. Thank you.
@mrkunalgoswami20104 жыл бұрын
Can u take edges from user ... ??
@ethicalitle97704 жыл бұрын
Yes you can
@mrkunalgoswami20104 жыл бұрын
@@ethicalitle9770 PLZ code one with full explanation of each line. Also make using adjacency list. Sir u will get some view, we will get knowledge.
@ethicalitle97704 жыл бұрын
@@mrkunalgoswami2010 Copy the code from the video except the main function. Copy the main function I have written below and paste it into your code. I have added a comment in each line so you can understand properly: int main(){ int v,e; // These will be used to take number of vertices and edges as input cout > v; Graph g(v);//A graph has been initialized with v vertices cout > e; // Now we take in "e" number of edges //We have to loop e times, take the edges' x and y as input and make the edges int x,y; for(int i = 1; i y; g.addEdge(x,y); } g.printAdjList(); // Now it will print all the edges return 0; }
@mrkunalgoswami20104 жыл бұрын
@@ethicalitle9770 sir i am going to do today
@mrkunalgoswami20104 жыл бұрын
@@ethicalitle9770 Sir i think g.printAdjEdge()
@hadeedfatema36393 жыл бұрын
i ddin't get point, for (int nbr:l[i]) ; also my compiler is giving error on this can you please help me resolving this?
@ritik56043 жыл бұрын
Switch your compiler version to C++ 14 . That's why you are facing an error
@BhagyaRana4 жыл бұрын
Prateek Bhaiya, You forgot to add One Line of Code to call the Print AdjList g.printAdjList();
@DenzelOden4 жыл бұрын
I was thinking the same thing, he added it but in the video you can notice a quick cut that jumps past where he added that and the semicolon at the end of 7:02
@simplifycs87532 жыл бұрын
Hi Bhagya pls checkout this explanation kzbin.info/www/bejne/pHKXmKmgmNRngas
@newos2 жыл бұрын
I m getting error on push back
@baxi92274 жыл бұрын
why create a class? Can't I make everything every time I want to use it? Is it that hard?
@cristieandino39913 жыл бұрын
Can you help me in my project?
@ashirbadbehera55444 жыл бұрын
why we use this->v = v instead we can't we write this.v = v
@AmitSingh-cs2hb4 жыл бұрын
'this' is a pointer not a object
@faang14854 жыл бұрын
When we use same variable then we have to use this pointer to distinguish between same named variable
@shubhambarnwal33874 жыл бұрын
Sir i want to take input by user ....Plz check i just edited the main function and remaining code is same ....What is the mistake ???Please comment int main() { int V,E,x,y; cout > V; cout >E ; Graph g(V); for(int i=0;i> y ; g.addEdge(x,y); } }
@Folderq3 жыл бұрын
I don't want to be a jerk, however how is it possible You are "Teaching" C++, while You can't go along with english. I hate thoose videos about advanced things and I absolutely can't understand person who's trying to explain, because I got a feeling I need another person who translate from "dis inglis" to "english". I have absolutely no idea what are You talking about... If some1 would change video name to "How to cook a soup" I wouldn't see any difference.