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.
@aquaworld99654 ай бұрын
Yes
@ARUNKUMARTIT4 ай бұрын
I also had the same doubt, but how this 1st solution also support the example 2? can anyone explain this
@chrischika70264 ай бұрын
3:42 the fact that it is pink and you said sweet middle lol that had to be intentional.
@aryanmishra1994 ай бұрын
Yeah I noticed that too lmaoo
@fancypants60624 ай бұрын
Very cool little trick for this one. I'm glad I watched it even though it was an easy question.
@md_pedia14 ай бұрын
The final solution was awesome Glad I watched ur solution!
@giovannigonzalez62724 ай бұрын
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_164 ай бұрын
No, You can just give up that easily, consistency is the key, keep grinding!! it will pay off soon
@pratyushthakur84784 ай бұрын
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
@MykolaPavluchynskyi4 ай бұрын
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.
@yang58434 ай бұрын
This problem is similar to City skyline
@slizverg234 ай бұрын
That feel then the problem marked "easy", but Neetcode's video is 16 min long...)))
@mahammedhashish91704 ай бұрын
Is it possible to come up with o(1) space solution in interview? What do you think?
@AJK-a2j00k44 ай бұрын
it's not very hard.. just take a paper and pen and draw it out, you might click prolly!
@chien-yuyeh93864 ай бұрын
Thanks for sharing. I think this one is interesting.
@abhishekdhyade75004 ай бұрын
Not the butt cheek with a pink middle 😂😂😂
@TechiSrivasanth4 ай бұрын
12 is lucky number for ur example plz check
@cosmic16024 ай бұрын
Please come up with a math course
@pastori26724 ай бұрын
you gave it all away when you said return an array is misleading lol
@epotnwarlock4 ай бұрын
3:44 we all do big guy
@chrischika70264 ай бұрын
3:34 gyattt
@BigStupidTech4 ай бұрын
Thank you for this!
@zweitekonto96544 ай бұрын
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.
@NeetCodeIO4 ай бұрын
can you explain, your explanation sounds oversimplified but maybe im missing something?
@zweitekonto96544 ай бұрын
@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.