ALIEN DICTIONARY | LEETCODE 269 | PYTHON TOPOLOGICAL SORT DFS SOLUTION

Sdílet
Vložit
  • čas přidán 26. 07. 2024
  • Channel Discord Community: / discord
    Problem Link: leetcode.com/problems/alien-d...
    Today I once again dust off my microphone and bring you a solution video for one of my favorite problems of all time: Alien Dictionary.
    This is a fun problem that uses topological sort to solve but building the input graph is quite tricky given the constraints of the problem.
    TIMESTAMPS:
    00:00 Intro
    00:18 Question Prompt
    00:59 Basic Examples
    02:10 In-Depth Example + Intuition
    09:15 Coding
    20:40 Time/Space Complexity
    23:00 Outro
  • Věda a technologie

Komentáře • 19

  • @landocodes
    @landocodes Před 5 měsíci +6

    I can't put a finger on why your solutions have been preferable over Neetcode for me but they have been! I was intimidated by this question but it's now much less intimidating and more fun! Thanks again bro

    • @crackfaang
      @crackfaang  Před 5 měsíci

      Glad you're enjoying the content and I hope others start preferring my channel to Neetcode's. Though I'm not sure the CZcams algorithm would push mine in the same way because I'm much much smaller of a channel

    • @landocodes
      @landocodes Před 5 měsíci

      Neetcode started small too man. I've cracked IG's "algorithm" before and you just gotta be consistent. Meta's hiring is ramping up and you're definitely gonna get more viewers.
      I'd recommend not having your videos private yet tho bro. I had to log into view this. If someone didn't know how great your solutions are, and saw other videos that are readily available, then they'd just watch that.
      But that's just unsolicited advice. Thnx again for the hard work! @@crackfaang

    • @landocodes
      @landocodes Před 5 měsíci

      Oh damn, I have to pay to watch the solutions now? TBH, I think that's a bad move homie.@@crackfaang

  • @siddardha14
    @siddardha14 Před 6 měsíci +2

    Always a big fan of your videos

    • @crackfaang
      @crackfaang  Před 6 měsíci

      Thanks for being a loyal viewer. Hopefully the vids are helping with your interview prep

    • @johnyoon5399
      @johnyoon5399 Před 6 měsíci

      They’re definitely helping me.

  • @zubaankesari8972
    @zubaankesari8972 Před 2 měsíci

    I had no idea how to solve this one. Your solutions are great and easily understandable than Neetcode for me personally. The solution code is not tricky and I am not trying to enter a competitive programming mindset so understanding code is what does it for me and your videos provide it. Keep shipping out more solutions and I feel you will have 100k soon.

    • @crackfaang
      @crackfaang  Před 2 měsíci +1

      Thanks for the kind words and glad you found the video helpful. This is one of my favourite questions so glad I did a good job explaining it.
      And less hopefully 100k one day but the growth is slow. I think Neetcode just dominates the market due to being recommended first. Oh well, one step at a time. I know I could get a lot more subscribers if I did videos with a camera and talked about real world experiences instead of LC questions but not ready to do that as I'd probably be told by HR to either quit or stop making the videos lol

    • @zubaankesari8972
      @zubaankesari8972 Před 2 měsíci

      @@crackfaang I feel like its more because of availability of solutions. I code in python and now I look for videos from you but there are a lot more videos done by Neetcode ofcourse. Like I said, keep shipping out more videos and you have the explanation to hit that growth once you have enough videos on LC solutions.

  • @dnm9931
    @dnm9931 Před 2 měsíci

    You do an amazing job man, Thank you soo much

  • @kadimisettyavinash
    @kadimisettyavinash Před 6 měsíci

    Great explanation man! All my worries are gone!! Please make videos regularly

  • @sarayarmohammadi3376
    @sarayarmohammadi3376 Před 6 měsíci

    Thank you!

  • @shahryar1128
    @shahryar1128 Před 6 měsíci +1

    Can you do a video on sliding windows and how to tackle those questions? The main issue that I am having is getting the time complexity to o(n)

  • @TooManyPBJs
    @TooManyPBJs Před 3 měsíci

    reminds me of my graduate algorithms class. can't imagine coding this in an interview though lol!!

  • @shahryar1128
    @shahryar1128 Před 6 měsíci +1

    Hes Back!!!!!!

  • @hooriehmarefat5972
    @hooriehmarefat5972 Před 3 měsíci

    In your video of Course Schedule and Course Schedule ||, you have white.pop() instead of next(iter(white)) in the main function and white.discard(node) in DFS. Can you explain why is it different here? I tested white.pop() and I know that it does not work but not sure why!

    • @crackfaang
      @crackfaang  Před 3 měsíci

      Are you sure? I tried white.pop() in my alien dictionary solution and it was accepted.
      I think pop() is probably preferred. Don't know why I was using next(iter(white)), must have gotten confused or thought the problem was slightly different.