MOVE ZEROES | LEETCODE 283 | PYTHON SOLUTION

Поділитися
Вставка
  • Опубліковано 8 січ 2025

КОМЕНТАРІ •

  • @nekoill
    @nekoill 11 місяців тому

    What an amazing channel, my brother! Love it a lot

  • @PranayKotapi
    @PranayKotapi 11 місяців тому

    Your thoughts on starting this swapping logic from start vs end?
    Feels like its much easier and more accurate doing from the end,
    loop til the counter reaches the start - swap while you find a 0

    • @crackfaang
      @crackfaang  11 місяців тому

      Solve it however you'd like really, I'm sure there's more than 1 way to do it. Either way you will parse the array once. Just make sure you have the same complexity for your algorithm and it should be fine

  • @3rd_iimpact
    @3rd_iimpact 11 місяців тому +1

    Thank you for this! Would it be possible to make one for 249. Group Shifted strings?

    • @crackfaang
      @crackfaang  11 місяців тому +1

      Could have sworn I already did that one but I guess not. Will add it to the queue