LeetCode Shortest Distance to a Character Solution Explained - Java

Sdílet
Vložit
  • čas přidán 7. 09. 2024
  • The Best Place To Learn Anything Coding Related - bit.ly/3MFZLIZ
    Join my free exclusive community built to empower programmers! - www.skool.com/...
    Preparing For Your Coding Interviews? Use These Resources
    --------------------
    (My Course) Data Structures & Algorithms for Coding Interviews - thedailybyte.d...
    AlgoCademy - algocademy.com...
    Daily Coding Interview Questions - bit.ly/3xw1Sqz
    10% Off Of The Best Web Hosting! - hostinger.com/...
    Follow Me on X/Twitter - x.com/nickwhit...
    Follow My Instagram - / nickwwhite
    Other Social Media
    ----------------------------------------------
    Discord - / discord
    Twitch - / nickwhitettv
    TikTok - / nickwhitetiktok
    LinkedIn - / nicholas-w-white
    Show Support
    ------------------------------------------------------------------------------
    Patreon - / nick_white
    PayPal - paypal.me/nick....
    Become A Member - / @nickwhite
    #coding #programming #softwareengineering

Komentáře • 12

  • @dhananjaysathe8223
    @dhananjaysathe8223 Před 5 lety +27

    Values in the step 2 seems to be wrong the array should be
    [ 12, 13,14,0,1,0,0,1,2,3,4,0]
    How can min( -12,3) be 3?? as per step 4

    • @NickWhite
      @NickWhite  Před 5 lety +4

      Dhananjay Sathe I make mistakes once in a while my G don’t really feel like checking but you’re probably right

    • @NickWhite
      @NickWhite  Před 5 lety +13

      yeah i just looked at it you're right i must've accidentally typed that it should be 12, 13, 14 because i - - n = i + n = 0 + 12 etc

  • @abhisheksuryavanshi9675
    @abhisheksuryavanshi9675 Před 4 lety +1

    Every time you say it's a pretty easy problem, I just go back to the problem and try to solve it again!

  • @curesnow6493
    @curesnow6493 Před 11 měsíci

    Your solution is very easy to understand Nick! How can we tell when we need to iterate through the array twice? From left to right and right to left?

  • @utpalborgohain2781
    @utpalborgohain2781 Před 2 lety

    Wow , awesome algorithm for solving the problem.Thanks for sharing!

  • @johnleonardo
    @johnleonardo Před 4 lety

    Nick White the legend as always. Senpai Nick.

  • @yasssh7835
    @yasssh7835 Před 4 lety

    Pretty good explaination!

  • @driziiD
    @driziiD Před 4 lety

    very good explanation!

  • @officialabdulrehman
    @officialabdulrehman Před 2 lety

    Thank you. You are OG!

  • @akansha_vatsa
    @akansha_vatsa Před 3 lety

    best explanation... !

  • @cupofjava5480
    @cupofjava5480 Před 2 lety

    sorry bro, but you write copied code and you don't even know what are you writing