andreyka26_se
609 subscribers
575 photos
66 videos
6 files
287 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
Sorry, was doing system design consultations, so I solved the daily challenge the last 10 mins as well
👍5
Solution

not sure about right solution, mine is cumbersome - but correct.

Just getting all "diagonals" from bottom to up, and reversing them if we need to move them from up to down.
👍4
Sorry, I didnt disappear, a lot of stuff going on, we soon gonna stream about observability in distributed systems. And we will implement system design of observability metrics, millions or even billions metric fires per second
7🤯1
Daily

https://leetcode.com/problems/maximum-area-of-longest-diagonal-rectangle/description/?envType=daily-question&envId=2025-08-26

Easy - go and collect the coin. 5 mins problem

I truly don't understand how come acceptance here is 42%, but on some dynamic programming optimization problem the rate might be 70% and you fucking have no idea even how to solve with bruteforce.
Leetcode is broken

#daily
Solution

Just apply Pythagorean theorem and find the longest diagonal.
If diagonals are the same - then pick the biggest area
3
gl hf gg
6
Fucking a lot of fun

The assessment is basically hard leetcode question. Involved coordinates and angles between points on coordinates system. Tomorrow we will review, and during stream as well

(For reference: glhf - good luck have fun, usually in rts games people are telling this to opponents)
1🔥82
Daily

https://leetcode.com/problems/length-of-longest-v-shaped-diagonal-segment/description/?envType=daily-question&envId=2025-08-27

Don't be that scared, 50% acceptance rate. Solved in 20 mins. Remember: rotation ONLY clockwise, and ONLY once.

After today's night nightmare with vectors, this is a joke task, really


Hint: Don't try bottom up, just do memoization, cause the number of parameters will be long in your dp function

#daily
Solution:

So we will try to start from all possible 1s. It will be dfs traversal. We DON'T have to track visited, cause we can rotate only once, therefore we never will intersect.

dp function will contain current row and current col, current direction, whether we expect to have 2 or 0 at current row, and whether we already changed the dir or not.

It feels like a lot of search space, but in reality, dir, istwo, and dirchanged are at most 2 or 4 different values (constant), what is really changing a lot and depends on input is r and c.

Then you basically follow the rule: try to go already set direction. If you didn't change direction yet - try it (next one clockwised)
👍21
andreyka26_se
gl hf gg
so about this shit. It is interesting how the task was organized. Actually they don't lock screen, they don't have "code" area. Only task assignment and bunch of test cases. you need to solve the problem in your IDE, run the code, and then attach the output of your solution + your solution itself. You have 3-4 hours on completion
3
andreyka26_se
so about this shit. It is interesting how the task was organized. Actually they don't lock screen, they don't have "code" area. Only task assignment and bunch of test cases. you need to solve the problem in your IDE, run the code, and then attach the output…
I cannot reveal a lot of stuff, but in general, your thoughts on it, how would you approach the problem:

You are given x,y coordinates of points. On the picture the points: A(x0, y0), B(x1,y1), C(x2,y2), D(x3,y3).

Given point A, you should tell all the points that are laying on the directions that are shown as blue (N(north), NE, E, SE, S, SW, W, NW). Apparently the angle between adjacent 2 directions is 45 degrees, e.g. from N to NE.

As an example for direction NW, we gonna find point B(x1, y1), point D(x3, y3) BUT NOT point C (x2,y2). You should identify such points per direction. So the output will be:

{NW: B, D, ...}

Your input will contain exact coordinates, not just xn,yn.
3
Sometimes I like to use office a bit and think about some system design problem over whiteboard
🔥10
Solution

Just traverse diagonals, store each of them in array, sort and put back
Stream today?
👍4
In 5 mins