Lucky Numbers in a Matrix - Leetcode 1380 - Python

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

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

  • @CoffeePoweredDev
    @CoffeePoweredDev Месяц назад +26

    The example is incorrect @1:26, the minimum in the third row is 12. So, the lucky number is 12 in the changed example. I think the confusion arises while doing example 2, but referring to example 1.
    But appreciate these videos as always as they are always helpful.

    • @aquaworld9965
      @aquaworld9965 Месяц назад

      Yes

    • @ARUNKUMARTIT
      @ARUNKUMARTIT Месяц назад

      I also had the same doubt, but how this 1st solution also support the example 2? can anyone explain this

  • @chrischika7026
    @chrischika7026 Месяц назад +19

    3:42 the fact that it is pink and you said sweet middle lol that had to be intentional.

  • @abhishekdhyade7500
    @abhishekdhyade7500 Месяц назад +7

    Not the butt cheek with a pink middle 😂😂😂

  • @fancypants6062
    @fancypants6062 Месяц назад +2

    Very cool little trick for this one. I'm glad I watched it even though it was an easy question.

  • @pratyushthakur8478
    @pratyushthakur8478 Месяц назад +1

    This was a fun question hopefully we get more matrx questions this week to practice for codesignal oas since new grad recruitment is starting soon

  • @md_pedia1
    @md_pedia1 Месяц назад +4

    The final solution was awesome Glad I watched ur solution!

  • @MykolaPavluchynskyi
    @MykolaPavluchynskyi Месяц назад

    I don't see need to check all rows and all cols after we identified max_of_mins. It's easier when we found max to also save column for that max. So second step would be to check only data in that exact column, not in all the matrix.

  • @giovannigonzalez6272
    @giovannigonzalez6272 Месяц назад

    The fact that ive gone through almost half of your neetcode 150 list and still cant solve easy problems like this is demotivating. Quitting sounds great right now!

    • @ShyGuy_16
      @ShyGuy_16 Месяц назад

      No, You can just give up that easily, consistency is the key, keep grinding!! it will pay off soon

  • @yang5843
    @yang5843 Месяц назад +3

    This problem is similar to City skyline

  • @mahammedhashish9170
    @mahammedhashish9170 Месяц назад +1

    Is it possible to come up with o(1) space solution in interview? What do you think?

    • @AJK-a2j00k4
      @AJK-a2j00k4 Месяц назад +1

      it's not very hard.. just take a paper and pen and draw it out, you might click prolly!

  • @chrischika7026
    @chrischika7026 Месяц назад +4

    3:34 gyattt

  • @cosmic1602
    @cosmic1602 Месяц назад +3

    Please come up with a math course

  • @chien-yuyeh9386
    @chien-yuyeh9386 Месяц назад

    Thanks for sharing. I think this one is interesting.

  • @slizverg23
    @slizverg23 Месяц назад

    That feel then the problem marked "easy", but Neetcode's video is 16 min long...)))

  • @TechiSrivasanth
    @TechiSrivasanth Месяц назад +1

    12 is lucky number for ur example plz check

  • @epotnwarlock
    @epotnwarlock Месяц назад +2

    3:44 we all do big guy

  • @BigStupidTech
    @BigStupidTech Месяц назад

    Thank you for this!

  • @pastori2672
    @pastori2672 Месяц назад

    you gave it all away when you said return an array is misleading lol

  • @zweitekonto9654
    @zweitekonto9654 Месяц назад

    I think you complicated it way too much. The simple logic behind the O(1) solution is that, there can only be one min or one max element in a collection of elements given they are all distinct. And the O(1) solution comes naturally after this.

    • @NeetCodeIO
      @NeetCodeIO  Месяц назад

      can you explain, your explanation sounds oversimplified but maybe im missing something?

    • @zweitekonto9654
      @zweitekonto9654 Месяц назад

      ​@NeetCodeIO Maybe I was thinking something else. My O(1) solution was different than yours and I didn't watch your solution complete. Your explanation is on point.