Did you solve this without hints ? Seems like a super tough problem and none of the solution was intuitive
@gmh14 Жыл бұрын
Just to get this intuition from the code would have been hard, let alone explaining it. Thank god you're back lol
@shoooozzzz Жыл бұрын
hardest medium on LC
@Moch117 Жыл бұрын
Man im glad i'm not the only one who felt this way. I was on a streak of 7 days but then came upon this problem which felt hard af
@julianelmasry9556 Жыл бұрын
literally same exact position. 7 day streak and this one killed my confidence.@@Moch117
@TheFast900 Жыл бұрын
The matrix intuition threw me for a loop so far the only one to explain the bxh res calculation, thanks!
@mindhealer6163 Жыл бұрын
Its definitely not a medium level question
@VIJAY-hg7ei Жыл бұрын
yeah
@NeetCodeIO Жыл бұрын
Yeah I thought it was pretty hard for medium
@arihantbedagkar7678 Жыл бұрын
Without sorting: Time: O(n*m), Space: O(m) n, m = len(matrix), len(matrix[0]) result = 0 towers = list(map(lambda x: (x, 0), range(m))) for i in range(n): new_towers = [] zeros = [] for j, height in towers: if matrix[i][j]: new_towers.append((j, height + 1)) else: zeros.append((j, 0)) towers = new_towers + zeros for j in range(m): result = max(result, (j + 1) * towers[j][1]) return result
@swastikgorai2332 Жыл бұрын
Can we do it without sorting ?
@user-j5ja95 Жыл бұрын
what does Neetcode think of copycat youtubers who copy your video thumbnail style for clickbait :') happens so often, I look forward to Neetcode videos, click on it and I start hearing someone else's voice
@NeetCodeIO Жыл бұрын
Yeah I've noticed a lot of those lately
@sadekjn Жыл бұрын
"medium"
@CS_n00b Жыл бұрын
I needed something like this for my quant internship
@hamirmahal Жыл бұрын
Do you mean it came up in the interview, or you actually had to do this for a real-world problem?
@broccoli322 Жыл бұрын
Nice
@yang5843 Жыл бұрын
Knight Dialer pls
@NeetCodeIO Жыл бұрын
Coming in 30min
@ronbuchanan54329 ай бұрын
I thought I'll like this question but I'm not
@PoRBvG8 ай бұрын
The code is good but the explanation has lots of gaps and mistakes
@VIJAY-hg7ei Жыл бұрын
Within One Year i will make a huge salary hike in my career dsa will be one of my areas on focus