andreyka26_se
609 subscribers
575 photos
66 videos
6 files
288 links
Hey, I'm software engineer at Microsoft, with 7 years of experience. Here we are talking about F(M)AANG big tech interviews: leetcode, system design and corpo life.

YouTube: @andreyka26_se
Instagram: andreyka26_se
TikTok: @andreyka26__
Download Telegram
Solution

constraints are not that high, so even bruteforce will work (check the biggest consecutive square starting from all Row col combinations

On top of that you might do it in constant time if you have precalculated maximum square to the right and maximum square to the bottom as shown on the picture.

So you define recursive function as "what is the biggest square starting from the current r,c" and add memoization. Bottom up conversion I will post in a bit.
1
andreyka26_se
Solution constraints are not that high, so even bruteforce will work (check the biggest consecutive square starting from all Row col combinations On top of that you might do it in constant time if you have precalculated maximum square to the right and maximum…
Hope you already did you own conversion from the top down to bottom up, here it is:
we reuse matrix as our dp table, as it is so convenient. Every cell will represent the maximum length of square that can be formed from this cell, and it is so conveniently precomputed here for us (1 means 1 square is definitely possible, and 0 means no)

Then we reverse the recursive function call stack and start not from the beginning but from the end. We change recursive function call to dp table call and everything else we leave almost the same
1
what are you doing , all this leetcode, system design???
me:
😁4
andreyka26_se
https://www.youtube.com/shorts/AUlkrjcyKnk
that's why on ALLLLLL tools inside MS I'm very satisfied and happy employee
Just got contacted by one recruiter from crypto. They have FIVE ROUNDS xDDD ridiculous, FAANG level. I definitely don't want to join any crypto shit, only if it is the biggest and in core functionality just to know how it works in real prod.

let's see, I want to try the interview process there.
On top of that it is devops engineer, and instead of System Design they have "devop interview" for devops eng.
Does anybody know about it? what is going to happen there? Recruiter told that it will be just theoretical questions about devops and best practices there.
Solution:

Basically the official solution is to try all possible row combinations like 0-1, 0-2, 1-2, 2-2, etc.
For each of these row ranges - we calculate the rectangle snapshot by &= operator, so if matrix has 0 at that position - then that cell is not participating in being part of rectangle.
This media is not supported in your browser
VIEW IN TELEGRAM
👍9🔥4
This media is not supported in your browser
VIEW IN TELEGRAM
👍8🔥4😁1
This media is not supported in your browser
VIEW IN TELEGRAM
👍9🔥3🤔1
So, today we will stream starcraft, it was hard week, I deserved xD
👍7😁2🔥1
now see the pain, first pic - my solution, second pic - official solution.. fuck my life😁
😁6
BTW, did it, now 400+😎
2👍12🔥3