First Missing Positive | Leet code 41 | Theory explained + Python code

Sdílet
Vložit
  • čas přidán 26. 07. 2024
  • This video is a solution to Leet code 41, First Missing Positive. I explain the question, go over how the logic / theory behind solving the question and finally solve it using Python code.
    Comment below if you have a better solution to this problem!
    Let me know if you have any feedback and don't forget to subscribe for more videos!
    Code: leetcode.com/problems/first-m...)
    More leetcode questions solved:
    • Add and Search Word - ...
    Timestamps:
    0:00 Question
    1:21 Solution Explained
    11:05 Python Code
    Gear used:
    Mic: amzn.to/3awi3b6
    Drawing pad: amzn.to/2O7PaaU

Komentáře • 12

  • @shihengguan684
    @shihengguan684 Před 2 lety +1

    can someone explain to me why we need the abs() function? I thought the first loop will give us all positive values?

  • @mhalton
    @mhalton Před 2 lety +1

    He confused the whole thing even more than it was!

  • @whitewolf8637
    @whitewolf8637 Před 3 lety +1

    Perfectly Done

  • @nawendusingh2858
    @nawendusingh2858 Před 3 lety

    Thanks and keep up the good work

  • @ishayadav5221
    @ishayadav5221 Před 3 lety

    Great work!

  • @mrcodercodes7684
    @mrcodercodes7684 Před 3 lety +1

    Keep It up Will help a Lot of Coder

  • @user-id4cx1gw5f
    @user-id4cx1gw5f Před 3 lety

    Hey man! Great job on the video, definitely see the pattern of converting the positive to negative numbers in previous questions. I have a question about the cleaning up part, why do we set it to the max positive number, is it possible to also set it to just the value 1?
    Thank you!

  • @mrcodercodes7684
    @mrcodercodes7684 Před 3 lety +1

    Anish Bro i made a pull request on GitHub and tried making your readme file more attractive . pls accept it