Two Sum | LeetCode 1 | Python | Easy

Поделиться
HTML-код
  • Опубликовано: 27 янв 2025

Комментарии • 13

  • @catocall7323
    @catocall7323 6 месяцев назад +3

    I am deeply impressed by your use of pen and paper, even the clever little slider. Pen and paper is what helps me the most with thinking about programming.

    • @GordonZhu
      @GordonZhu  6 месяцев назад +1

      Thanks for noticing the little details! Agreed pen/paper is a super underrated tool. The effect at 1:16 was cool to figure out. I tried the blur the lines between physical and digital.

  • @rohinv2752
    @rohinv2752 7 месяцев назад +2

    This is such nugget of gold! You've explained everything soo well, keep it coming!!

    • @GordonZhu
      @GordonZhu  7 месяцев назад

      Thank you! I've already put together a few other similar videos. Make sure that you check them out on my channel.

    • @rohinv2752
      @rohinv2752 7 месяцев назад +1

      @@GordonZhu I definitely will!

  • @JRivero
    @JRivero 6 месяцев назад +1

    This is golden. Thank you very much!

    • @GordonZhu
      @GordonZhu  6 месяцев назад

      Glad you enjoyed it! Just posted a video for "Two Sum II", the follow-up to this problem. Check it out and lmk what you think! ruclips.net/video/C3PFKlDeB7M/видео.htmlsi=nlbb6H8Zbz58ZwKf

  • @RealBelalMuhammed
    @RealBelalMuhammed 8 месяцев назад +2

    Great video

    • @GordonZhu
      @GordonZhu  8 месяцев назад

      Thank you! Excited to put more out

  • @preranasuryawanshi3582
    @preranasuryawanshi3582 6 месяцев назад

    Great videos 👍🏻

    • @GordonZhu
      @GordonZhu  6 месяцев назад

      Thank you! Make sure to check out my video for Two Sum II if you haven't yet!
      ruclips.net/video/C3PFKlDeB7M/видео.html

  • @IdrisIdris-xq9ki
    @IdrisIdris-xq9ki 8 месяцев назад

    The question said "you may assume each input has exactly one solution"
    Hence the solution either has no number repeated in the array, or the solution is a repeated number in 2 indices.

    • @GordonZhu
      @GordonZhu  8 месяцев назад

      Those are *not* the only cases with repeated numbers. You could also have a case like [2, 2, 2, 2, 7, 3] where the target is 10.