LeetCode Shortest Distance to a Character Solution Explained - Java

preview_player
Показать описание


Preparing For Your Coding Interviews? Use These Resources
————————————————————

Other Social Media
----------------------------------------------

Show Support
------------------------------------------------------------------------------

#coding #programming #softwareengineering
Рекомендации по теме
Комментарии
Автор

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

dhananjaysathe
Автор

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

abhisheksuryavanshi
Автор

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?

curesnow
Автор

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

utpalborgohain
Автор

Nick White the legend as always. Senpai Nick.

johnleonardo
Автор

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

cupofjava
join shbcf.ru