Комментарии:
Do you want to see more videos with a technical "interview prep" focus? Usually I cover practical projects, so curious to know what you think...
ОтветитьThank You So Much for this wonderful video...🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻
ОтветитьAmazing video!! Practical problems are ALWAYS better than abstract ones.
ОтветитьA course on DSA please
ОтветитьYour channel is sooooooo awesome, congratulations! One question that I have: Is the set used at the DFS function a memoization technique?
Ответитьdid you post the code somewhere?
ОтветитьVery good video. I implemented in Go for myself, and turned out it was DFS 😂
Ответитьmore algorithms PLEASEEEEEEEEE !!!!!!!!!!!!!!!!!!!!!!!
ОтветитьThank you!This taught me more in a few mins than my professor in hours!
ОтветитьThis channel is a gem
ОтветитьThe beginning feels like Gordon Ramsay made it. Love is!
ОтветитьSome people were really born to teach.Congrats
ОтветитьGraph theory… the only class I almost straight flunked in college and still shiver thinking about. Maybe it’s easier now with code, but in theory it’s confusing AF
ОтветитьI wish it wasn't so zoomed in and double spaced
Ответитьthis video is 629 seconds long
ОтветитьPlease do more videos like these
ОтветитьVery clear instructions. I only know Python and I completely understood your coding process with Javascript.
ОтветитьQuality
Ответитьman this is gold
ОтветитьAdd start to initial set in bfs to avoid an extra search of the node you started with
Ответитьthank you, will be practising a lot
Ответитьwow so fantastic, so fast and all necessary details/CRITICAL details are covered with real time application.
This really makes me so excited to dig deeper into the topic.
Keep posting more informative videos like this.
And could be also attach code in the video description in popular 3 languages like python, Java, c++ along with javascript
tried a lot not to laugh, but couldn't control everytime he said 'bangcock'
ОтветитьIntresting
ОтветитьPhenomenal content, thank you so much!!
Just have one question:
In the implementation of the BFS algo, the starting node should also be added to the visited Set before the while loop starts, right?
Fatastic .... 1 minute .... my full page is covered with expensive knowledge ..... How good you are ❤. It make me think of how much knowledge creator fed in you..... brilliant
ОтветитьShouldn't dfs(destination, visited) be precede by return dfs(destination, visited) ?
ОтветитьFor the DFS approach, don't we need a check for the exit base case? (Something like 'if start != null") Or is it ok because we're using JavaScript and it will kind of fail semi-gracefully on its own anyway?
Ответитьcool!
Ответитьi wrote the same program are it is giving me this error ."Cannot read properties of undefined (reading 'push')".occuring at adjecencyList.get(destination).push(origin);
ОтветитьIn 10 Min, I came out with a better understanding of graphs then I have in the previous attempts (which was a lot). Thanks for making graphs make sense.
ОтветитьCREDITS: goto (stackoverflow)
const airports = "PHX BKK OKC JFK LAX MEX EZE HEL LOS LAP LIM".split(" ");
const routes = [
["PHX", "LAX"],
["PHX", "JFK"],
["JFK", "OKH"],
["JFK", "HEL"],
["JFK", "LOS"],
["MEX", "LAX"],
["MEX", "BKK"],
["MEX", "LIM"],
["MEX", "EZE"],
["LIM", "BKK"]
];
const adjacencyList = new Map();
function addNode(airport) {
adjacencyList.set(airport, []);
}
function addEdge(origin, destination) {
adjacencyList.get(origin).push(destination);
const dest = adjacencyList.get(destination);
if (!dest) {
addNode(destination)
}
adjacencyList.get(destination).push(origin);
}
airports.forEach(addNode);
routes.forEach(route => addEdge(...route));
console.log("result");
adjacencyList.forEach((value, key) => {
console.log(key, value);
});
Quick Question: doesn't the function execution should stop after it hit 'Return'? why does the output shows JFK to LOS after it actually found the "BKK".
Ответитьthanks
ОтветитьBro! The way you explained this and the neatness of your codes I could grasp the Graph theory quickly. Please make a series.
ОтветитьThis is such a great video!Thank you!!!!
Ответитьthis actually just helped me in a FANG interview, great stuff!
ОтветитьTBH BFS actually guarantees a solution (if it exists) and gives you the shortest path (if implemented correctly), so I guess to check if a path exists both BFS and DFS can work but if you want to find the shortest path use BFS.
ОтветитьThe format of these videos is brilliant! 100 seconds intro and then, if you want it, some practical implementation.
ОтветитьAmazing vídeo!
ОтветитьThat was great stuff...! Can you make a video about representing a graph for course dependencies, and if the dependencies have a cyclic reference or loop.
ОтветитьReally nice video! Although using map and set do add a O(logV) factor in the final complexity and, depending on how js handles popping elements from the front of the array, an O(V) factor
Ответитьlinear time based on edges... linear space based on nodes... O(n), O(m), respectively...
Ответитьdam this is so much more helpful than the leetcode graph card, thank you so much!
ОтветитьHe just solved the most difficult problem in the world 😳...
Ответить🔥
Ответитьamazing
ОтветитьHello, feeling newb here. where did u initialized the "steps" variable at?
ОтветитьPlease lower down background music
Ответить