Graph Search Algorithms in 100 Seconds - And Beyond with JS

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 เม.ย. 2020
  • Prepare for a technical interview by learning about the graph data structure and basic traversal algorithms like depth-first search (DFS) and breadth-first search (BFS). fireship.io/courses/javascrip...
    #compsci #JavaScript #100SecondsOfCode
    Install the quiz app 🤓
    iOS itunes.apple.com/us/app/fires...
    Android play.google.com/store/apps/de...
    Upgrade to Fireship PRO at fireship.io/pro
    Use code lORhwXd2 for 25% off your first payment.
    My VS Code Theme
    - Atom One Dark
    - vscode-icons
    - Fira Code Font
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 500

  • @Fireship
    @Fireship  4 ปีที่แล้ว +921

    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...

    • @sadn1ck
      @sadn1ck 4 ปีที่แล้ว +39

      YES please! Much love!

    • @nicolasferrero9928
      @nicolasferrero9928 4 ปีที่แล้ว +6

      I like this videos more than others

    • @PrakashVl
      @PrakashVl 4 ปีที่แล้ว +4

      Yes interview preparation, this one is awesome

    • @abhinav.sharma
      @abhinav.sharma 4 ปีที่แล้ว +8

      YEEEEEEEEEEEEEEESSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS

    • @sagnikpradhan3594
      @sagnikpradhan3594 4 ปีที่แล้ว +3

      Yes!

  • @nils42
    @nils42 4 ปีที่แล้ว +138

    Thanks, with my 6 years+ experience as a Frontend-dev, I now feel like a junior-dev again 😅

    • @shygrammer
      @shygrammer 13 วันที่ผ่านมา

      you just said it!

  • @sagnikpradhan3594
    @sagnikpradhan3594 4 ปีที่แล้ว +403

    I would love more algorithms, data structures, and ML too!

  • @ihavetwofaces
    @ihavetwofaces 3 ปีที่แล้ว +49

    +1 for the "x in 100 seconds... but wait there's more!" format. Getting a brief overview of the concepts followed immediately by a more in-depth implementation of those concepts is a fantastic way to structure the video.

  • @meco
    @meco 4 ปีที่แล้ว +192

    I would’ve needed this for my computer science class 😫😫 Once again your content is the high quality learning we all needed

    • @athulp6591
      @athulp6591 4 ปีที่แล้ว +3

      In my case , it is right on time.

    • @miteshkumar3183
      @miteshkumar3183 4 ปีที่แล้ว +2

      This is a basic topic in a first semester computer science class.

  • @anirudhtv
    @anirudhtv 4 ปีที่แล้ว +193

    IF CS WAS A MOVIE THEN
    THIS MAN YOU WOULD BE THE AUTHOR

    • @YoloMonstaaa
      @YoloMonstaaa 4 ปีที่แล้ว +4

      Movies have script writers and directors as key creative roles. No authors.

    • @calvinebun-amu5397
      @calvinebun-amu5397 4 ปีที่แล้ว

      100%

    • @Fireship
      @Fireship  4 ปีที่แล้ว +31

      I'm writing a screenplay titled "CS - The Movie" ;)

    • @raymondmichael4987
      @raymondmichael4987 4 ปีที่แล้ว

      Fireship, I'll definitely watch it.
      Greetings from Tanzania 🇹🇿

    • @abelkidanemariam6485
      @abelkidanemariam6485 4 ปีที่แล้ว +1

      another Ali gate fan here

  • @simplyweird6369
    @simplyweird6369 4 ปีที่แล้ว +46

    Definitely want Algorithms, Design Patterns and Data Structures 🙏

  • @Pogibakayo
    @Pogibakayo 4 ปีที่แล้ว +66

    So glad. While these X in 100 seconds videos are great for some topics, this definitely needed a longer one.

    • @Fireship
      @Fireship  4 ปีที่แล้ว +24

      Thanks! Yeah, trying to decide if I should make them as completely separate vidoes

    • @Pogibakayo
      @Pogibakayo 4 ปีที่แล้ว +6

      Fireship I’d certainly love that! But honestly, anything you put out is gold. You’re on fire.

    • @Ajay-ku6oq
      @Ajay-ku6oq 4 ปีที่แล้ว +1

      @@Fireship Maybe release them simultaneously so that people who want can watch both and there is a higher chance of one going viral.

    • @Sunwarul
      @Sunwarul 4 ปีที่แล้ว +3

      @@Fireship Please make this type of video with a slow pace. Your teaching style is good. but just take longer and bit slower-paced videos. Give some time to grasp the concept along. However, like these videos. Thanks!

    • @LineageFalcon
      @LineageFalcon 4 ปีที่แล้ว

      Fireship Yeah, I think u definitively should do that. Some of your viewers want more in-depth information and with a bit more time to consume it. So I think it is a good Idea to do a 100 secs version and a in-depth version. Anyways I really appreciate your work and passion. Thank your for your vids. Have a nice day. :D

  • @dnk1312
    @dnk1312 4 ปีที่แล้ว +7

    Every time the outro music fades in, I can literally feel that 'i get it now' rush ! Thanks a lot and keep up the outstanding work !!

  • @aykborstelmann8623
    @aykborstelmann8623 4 ปีที่แล้ว +17

    I really appreciate this format especially the combination of 100 seconds & beyond 100 seconds

  • @099watcher
    @099watcher 4 ปีที่แล้ว +44

    That was sweet!
    Please create a playlist of data structures and algorithms.
    Great content, keep it up 👍🏻.
    🔥🔥🔥

  • @TheNewton
    @TheNewton 4 ปีที่แล้ว +25

    5:32 Javascript destructuring in 100 seconds

    • @eshaan7_
      @eshaan7_ 4 ปีที่แล้ว +10

      more like JavaScript de-structuring in 100 milliseconds.

  • @sathishshaj7815
    @sathishshaj7815 4 ปีที่แล้ว +71

    This video is more than worth of my three year CS degree 🔥

  • @daheck81
    @daheck81 4 ปีที่แล้ว +11

    100 seconds of different time complexities as in the Big-O-Notation would be awesome. I tend to forget how they work when I haven’t dealt with them in a while (same with Regex) so I think a 100 second reminder would be perfect!

  • @OEThe11
    @OEThe11 ปีที่แล้ว +1

    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.

  • @rebelmachine88
    @rebelmachine88 4 ปีที่แล้ว +1

    I love this! Very clear explanation. I would love a mix of project videos and interview ones like this.

  • @darshangowda309
    @darshangowda309 4 ปีที่แล้ว +8

    Wow! This is awesome 🙌 would love to see more of this!

  • @andylib
    @andylib 4 ปีที่แล้ว +1

    This was amazing! Great speed, great length, great everything!

  • @Zeda_
    @Zeda_ 4 ปีที่แล้ว

    This video is awesome! I love seeing these 100 second videos pop up in my feed, they’re always fantastic. One note though: an adjacency matrix does have very bad space complexity, but part of the reason for that is that it’s making the trade-off for time. It actually is quite time efficient to check specific connections [O(1)], so it just depends on what your program is prioritizing or needs.

  • @AiguretDuren
    @AiguretDuren 3 ปีที่แล้ว

    I really enjoyed working with these data structures and algorithms in JavaScript. I would love to see more of this!

  • @shubhsheth
    @shubhsheth 4 ปีที่แล้ว +1

    Great timing, would definately love more videos like this!

  • @leaxem
    @leaxem 4 ปีที่แล้ว

    This is great. Best implementation of DFS / BFS I have seen in a while. Thanks.

  • @hendrickmanenga9213
    @hendrickmanenga9213 ปีที่แล้ว +1

    Some people were really born to teach.Congrats

  • @k3tna
    @k3tna 4 ปีที่แล้ว

    You've made this one understandable enough for a person who hasn't yet got to this part of programming. Solid introduction to the topic. Didn't get everything, but the idea is very clear. Cheers!

  • @gautamgadipudi8213
    @gautamgadipudi8213 4 ปีที่แล้ว

    I can't believe I'm watching this in my leisure time. This is quality content! Keep them coming. Would love to see more algorithms explained like this. Thanks buddy, you're a rockstar! :)

  • @planetmall2
    @planetmall2 4 ปีที่แล้ว

    Awesome job! Thank you. 100 seconds is great no complaints but beyond is next level!

  • @June_Yue
    @June_Yue ปีที่แล้ว

    Thank you!This taught me more in a few mins than my professor in hours!

  • @bahgatmashaly4196
    @bahgatmashaly4196 4 ปีที่แล้ว

    I needed this for my computer science class , your content is the high quality learning we all needed

  • @marshallmurray8050
    @marshallmurray8050 4 ปีที่แล้ว

    Yes, I would definitely like more videos with technical interview prep focus. I'm probably a ways off of an actual interview, but it's nice to mentally prepare proactively because I'm such a good procrastinator!

  • @teddified3845
    @teddified3845 3 ปีที่แล้ว

    This hooked me like crazy. Please do more data science and algorithm videos like this. Loved it!

  • @TheGitGuild
    @TheGitGuild 4 ปีที่แล้ว +51

    This is really nice. Also try making the speed 2x and watch it like 3 times if you want to overclock your brain. But it could cost you a few more seconds tho :/

  • @rynkydynky
    @rynkydynky 4 ปีที่แล้ว

    Finally somebody explaining Algortithms with Javascript Sets and Maps! Thank you.

  • @Takuroni
    @Takuroni 4 ปีที่แล้ว

    It's crazy how much I learn from your videos in such a short time. Thanks you are the best.

  • @emmalopez5805
    @emmalopez5805 2 ปีที่แล้ว

    this actually just helped me in a FANG interview, great stuff!

  • @youssefmuhamad3213
    @youssefmuhamad3213 4 ปีที่แล้ว +3

    That was awesome, keep it up with more advanced stuff

  • @nulI_dev
    @nulI_dev 4 ปีที่แล้ว

    this makes so much more sense than any CS video i've ever watched

  • @mrviometal4948
    @mrviometal4948 4 ปีที่แล้ว

    Make all 100 seconds videos like this, a 100 seconds explaining everything simply, then go into details...this is awesome

  • @nebraska7891
    @nebraska7891 4 ปีที่แล้ว

    This was incredible! Finally a real world example where you show the power of recursion 🙌

  • @Brunoenribeiro
    @Brunoenribeiro 3 ปีที่แล้ว

    fireship does youtube like no other channel
    the "basics in 100s + deep dive" format is a blast, man

  • @golddropper2747
    @golddropper2747 ปีที่แล้ว

    Very clear instructions. I only know Python and I completely understood your coding process with Javascript.

  • @melvins126
    @melvins126 4 ปีที่แล้ว

    This content is GOLD. Tyvm

  • @ikezedev
    @ikezedev 4 ปีที่แล้ว

    It is so nice knowing that you decided to use recursion instead of stack in DFS to show to show it can be down either way. Thanks a lot Jeff 😍

  • @realconect
    @realconect 4 ปีที่แล้ว +1

    Amazing, as usual. It’d be awesome if you created a full course on algos. Thanks! 😃

  • @DeAndreJohnson212
    @DeAndreJohnson212 4 ปีที่แล้ว

    Yes, definitely want more data structures and algorithms videos like this! Thanks for these videos, I wish I would’ve had you as my CS Instructor 😂

  • @thebotlist
    @thebotlist 3 ปีที่แล้ว

    Thanks for taking the time to make this great video! I'm doing interview prep, like many others. There was a problem I ran into while recreating breadth first search graph traversal: the enqueue in the 'bfs' method was happening regardless if the destination was in the visited Set so I ran into an endless loop scenario. I removed that and just kept the enqueue in the 'if not visited' statement and I get the correct answer. Please forgive if I just missed some of the code in the tutorial and thanks again for the great video/succinct example!

  • @davidvideauortega287
    @davidvideauortega287 4 ปีที่แล้ว

    Hellllll I loved this video. THANK YOU!!! This channel is seriously awesome. One of the best coding channels in the entire internet. ❤

  • @opeyemijonah8530
    @opeyemijonah8530 ปีที่แล้ว

    Bro! The way you explained this and the neatness of your codes I could grasp the Graph theory quickly. Please make a series.

  • @AleksandarT10
    @AleksandarT10 4 ปีที่แล้ว +1

    Would be great to do more of these technical "intervew prep" videos. Awesome explanation! Sums up half semester of Algorithms course :D

  • @woodylucas
    @woodylucas 3 ปีที่แล้ว

    When I say I was stressing! This just saved my life thank you.

  • @aakashbiswas3942
    @aakashbiswas3942 4 ปีที่แล้ว

    Greatest explanations i've ever seen on TH-cam hats off @fireship

  • @Heisenberg-xc8ub
    @Heisenberg-xc8ub 3 ปีที่แล้ว

    If only I knew that Javascript was this complex before I would have paid more attention to it. I'm a backend developer and thanks to your videos I have been slowly getting better and more interested in Javascript. Awesome work as always keep up these explosive contents!

  • @Loopmootin
    @Loopmootin 3 ปีที่แล้ว +1

    3:25 "go slowly and explain every step!" while going on for 10½ minutes like an absolute rap god xD Had to watch the video back to back twice and still only got half of it, but loved all of it ^^

  • @urishmueli
    @urishmueli 4 ปีที่แล้ว

    Another great video! Please continue

  • @tambolaking5383
    @tambolaking5383 4 ปีที่แล้ว

    Loved this. 100 seconds to grab attention and beyond for serious developers

  • @eyrewiut411
    @eyrewiut411 4 ปีที่แล้ว

    This is great! Just what I needed!

  • @Aaronmoreno
    @Aaronmoreno 4 ปีที่แล้ว

    one of my favorite videos so far!

  • @CodeMonkeyG2011
    @CodeMonkeyG2011 2 ปีที่แล้ว

    The format of these videos is brilliant! 100 seconds intro and then, if you want it, some practical implementation.

  • @ttul007
    @ttul007 4 ปีที่แล้ว

    great video! quick and efficient refresher for stuff i touched 10+ years ago when i did my bachelor's. thanks :)

  • @wertexify
    @wertexify 4 ปีที่แล้ว

    +1 for more algo/ds in JavaScrip! Amazing content.

  • @Blixzful
    @Blixzful 4 ปีที่แล้ว +1

    Been enjoying your content for years, Jeff. Wish I had you when I studied CS :) Suggestion: Sort algorithms for DBs and why they're useful in different scenarios.

  • @RTshots
    @RTshots 4 ปีที่แล้ว +1

    I didn't know I needed a fireship video about cs theory until I watched one. Plz do more

  • @Centori88
    @Centori88 2 ปีที่แล้ว

    This is such a great video!Thank you!!!!

  • @emsourcemedia9178
    @emsourcemedia9178 4 ปีที่แล้ว

    This is by far the best explanation of node.

  • @kritikkaushal6305
    @kritikkaushal6305 4 ปีที่แล้ว

    straight up one of the best channels on yt

  • @Sagar_RS
    @Sagar_RS 4 ปีที่แล้ว

    This is awesome, please keep it going 👍 , need more of these .

  • @joaomelo6642
    @joaomelo6642 4 ปีที่แล้ว

    i love your channel for a long time. content and form are premium. i confess i was not so engaged with 100 secs videos. seemed hushed. this approach with 100 secs as intro to something more in depth following is perfect to me. thanks for such great work.

  • @jannotabamo4002
    @jannotabamo4002 4 ปีที่แล้ว

    Thank you so much for sharing very high quality contents!! More CS topics pleaseee :)

  • @matthewgrichmond
    @matthewgrichmond 4 ปีที่แล้ว

    Great explanation as always, thanks! 👊

  • @nero-kun-here
    @nero-kun-here 4 ปีที่แล้ว

    Very good quality content! I love it! need more videos like this....

  • @joaotextor4094
    @joaotextor4094 8 หลายเดือนก่อน

    Amazing video!! Practical problems are ALWAYS better than abstract ones.

  • @samueljanda3903
    @samueljanda3903 4 ปีที่แล้ว

    OMG, this video actually solved the programming problem that I am having today! Just my luck, thank you so much.

  • @mangeshgupta5677
    @mangeshgupta5677 3 ปีที่แล้ว

    Thanks man , I used to fear from this topics , you made so easy that any non tech guy can understand completely . God bless you 🙏

  • @johnwillliamson8063
    @johnwillliamson8063 4 ปีที่แล้ว

    This is really cool! More traversal methods please!

  • @anishkarthik4309
    @anishkarthik4309 ปีที่แล้ว

    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

  • @kristofs8893
    @kristofs8893 4 ปีที่แล้ว

    You just saved me a ton of time. Thanks for the video. :) Keep it up.

  • @RachitSharma995
    @RachitSharma995 4 ปีที่แล้ว

    Great video. Would love to see more!

  • @arjunyonzan8557
    @arjunyonzan8557 ปีที่แล้ว

    thank you, will be practising a lot

  • @Zhuclam
    @Zhuclam 4 ปีที่แล้ว

    This reminds me of one of the first excersices of the book "eloquent JavaScript", it was awesome!

  • @bmejia220
    @bmejia220 2 ปีที่แล้ว

    Wow brilliant tutorial man brilliant lesson thanks so much learning so much here

  • @robocop30301
    @robocop30301 4 ปีที่แล้ว

    Great stuff! Thank you for the content!

  • @SogMosee
    @SogMosee 4 ปีที่แล้ว

    This video was a majestic thing of beauty.

  • @stith_pragya
    @stith_pragya 8 หลายเดือนก่อน

    Thank You So Much for this wonderful video...🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻

  • @optimusdebugger9638
    @optimusdebugger9638 4 ปีที่แล้ว

    yes please we want to see more videos like this!

  • @matievisthekat
    @matievisthekat 4 ปีที่แล้ว

    Love the beyond 100 seconds part!

  • @shauryaverma8780
    @shauryaverma8780 4 ปีที่แล้ว

    Please provide us with more algorithm, data structure videos which also focus on the interview perspectives, like this video did. Love your efforts man!!! Thanks

  • @samario_torres
    @samario_torres 4 ปีที่แล้ว

    That was great. I would like to see more of these. And also the thought process that takes place when you should use a Map..how to effectively use maps

  • @minglee5164
    @minglee5164 3 ปีที่แล้ว

    Awesome 👏 everything can be explained in 100s

  • @gagahkharismanuary9385
    @gagahkharismanuary9385 4 ปีที่แล้ว

    Sooo cool dudee!! I really take my notes and learnt from your explained

  • @Sunwarul
    @Sunwarul 4 ปีที่แล้ว

    Thank you so much. Please make more and more videos on Data Structures and Algorithms. Thank you once again!

  • @austinealagi
    @austinealagi 4 ปีที่แล้ว

    Thanks you so much for this video ❤️ you are a life saver. I will need more of this video.

  • @s.hariharan6958
    @s.hariharan6958 หลายเดือนก่อน +1

    you are Saviour of cs students 🙇‍♂🙇‍♂...

  • @MCMadk
    @MCMadk 4 ปีที่แล้ว

    Amazing content. Thanks !

  • @kevnar
    @kevnar 2 ปีที่แล้ว +1

    I had to figure all this stuff out on my own when trying to implement A* pathfinding in a game I made. The tutorial I followed used an adjacency matrix. But my game maps were 1000 x 1000. The whole thing crashed when it tried to build the matrix. So I manually went through and converted the graph to a list structure, so only nodes with edges were stored.
    I guess I could have saved the whole thing to the hard disc instead of keeping the whole graph in memory at run-time, but I learned a lot fixing that problem.

  • @omerfaruk7471
    @omerfaruk7471 4 ปีที่แล้ว

    Keep up with the great content man

  • @PraveenKumar-ft2kr
    @PraveenKumar-ft2kr 2 ปีที่แล้ว

    Amazing one.. WE need more of these :) Bring it on brother ✌

  • @johnnyx6654
    @johnnyx6654 4 ปีที่แล้ว

    Not gonna lie, have an interview coming up and this was amazing, thanks so much for sharing the knowledge

  • @MarsTheProgrammer
    @MarsTheProgrammer 3 ปีที่แล้ว +1

    For anyone that didn't see how you get the steps at 9:49 it's `DFS found Bangkok ${visited.size} in steps`. Use the visited size.

  • @carcamp5451
    @carcamp5451 ปีที่แล้ว

    This channel is a gem

  • @ayushmanbt
    @ayushmanbt 4 ปีที่แล้ว +1

    Sure this is awesome❤️ we definitely need more of these

    • @10xGarden
      @10xGarden 4 ปีที่แล้ว

      At least it will help us cracking the coding interview

  • @danbergelt8969
    @danbergelt8969 4 ปีที่แล้ว

    Great video. You should totally do a whole series of fundamental CS concepts.