andreyka26_se
1.12K subscribers
1.1K photos
142 videos
7 files
615 links
Hey, I'm software engineer at Microsoft, with 8+ 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
andreyka26_se
In the system design diagram there are: - 3 chats, - every chat has 4 users. - GW -> socket gateway server that handles client's socket. - Chat API is separate for simplicity to not cover processing of the messages on the GW itself You can see that if…
Other way to show it. In this diagram (screen 1), we have only 1 chat with 4 participants per chat and 1 message per second coming to this chat from one of the clients (out of scope).

Do you see it? Every WS Gateway have to process all messages, as chat participants are connecting randomly (or deterministically but based on user_id property).

From now on, unless number of WS Gateways is more than max number of participants in chat - it will always be the case. Check screen 2, number of nodes = 5 > participants per chat = 3 (top 3 clients => chat1, bottom 3 clients => chat2). Now WS gateways process 1 message per second, except WS Gateway1, because he has users from both chats.

Screen 3 - is the same scaled situation but with single chat
πŸ”₯6
Daily (240/373 streak until LC cap)

Today is good problem, not bullshit, I like when it has some sort of simulation and objects to play with.

https://leetcode.com/problems/walking-robot-simulation/description/?envType=daily-question&envId=2026-04-06

#daily #medium
❀5
andreyka26_se
So, it is the time. Do you want to try yourself for System Design? You remember I said I don't know the good real prod solution for Messenger System Design? It is time to shine and give your ideas, while I'm prepping the article, so that I can consider all…
So,
Guys, I am finishing the article.
Anything except:
1. Chat api pushing message updates directly to GW nodes (socket stateful nodes)
2. Chat api publishes message update to queue per user
3. Chat api publishes message update to queue per chat

These are typical what I have seen on the forums.
Shout if you have some different approach in your mind. It is okay that it might be not correct. Also can be the real solution and I will defeat with my arguments
πŸ”₯6
Daily (241/373 streak until LC cap)

Interesting problem, a bit bullshit as there is no pattern to learn, but fun, with funny corner case xD

https://leetcode.com/problems/walking-robot-simulation-ii/description/?envType=daily-question&envId=2026-04-07

#daily #medium #nopattern
πŸ‘4
Daily (242/373 streak until LC cap)

Should be easy instead of mid, 2 mins to solve, just simulate what is written. The only thing that worries me the number "I" in the title. Probably tomorrow we gonna have fucking hell problem.

https://leetcode.com/problems/xor-after-range-multiplication-queries-i/description/?envType=daily-question&envId=2026-04-08

#daily #medium #nopattern
πŸ”₯3😁2
This media is not supported in your browser
VIEW IN TELEGRAM
😁6
Daily (244/373 streak until LC cap)

Easy one, actually good for some simple leetcode patterns. Recommended

https://leetcode.com/problems/minimum-distance-between-three-equal-elements-i/description/?envType=daily-question&envId=2026-04-10

#daily #easy #pattern
πŸ‘3
This media is not supported in your browser
VIEW IN TELEGRAM
Back in the game. Also want to try again some group trainings for a couple of times to remind myself some youth moments
πŸ”₯15
Wtf, maybe stop? What happens with market, every single day I am poorer and poorer. Wondering if it is related to my first oncall shifts
🀯9
Daily (245/373 streak until LC cap)

The same problem as yesterday with stricter constraints. (Yesterday's optimized solution will work)

https://leetcode.com/problems/minimum-distance-between-three-equal-elements-ii/description/?envType=daily-question&envId=2026-04-11

#daily #medium #pattern
πŸ‘5
Champ’s dinner, 1:30 AM 😁😁😁
I need to fix my schedule, and food in general. At least there is pepperπŸ˜†
1😁11
Today is drop.
I promised myself in the morning that I'm not leaving office until I'm finished.
I'm finished. Going home and will deploy

28 pages of nerdish text about why everyone around is wrong😁😁😁😁
1πŸ”₯12
andreyka26_se pinned Β«Oookay, now I hit System Design problem I am not able to solve(partially). Problem: Design Messenger, but not pussy Whatsapp with 250 user/chat, but rather gigachad Telegram scale with 200k user/chat. I already consulted with 3 principals, 2 of them from…»
Daily (246/373 streak until LC cap)

Good problem to remind yourself DP. Not hard tbh (at least topdown)

https://leetcode.com/problems/minimum-distance-to-type-a-word-using-two-fingers/description/?envType=daily-question&envId=2026-04-12

#daily #hard #pattern
πŸ‘3❀2
Daily (247/373 streak until LC cap)

For tomorrow. Easy problem for 1 min, go and collect the coin

https://leetcode.com/problems/minimum-distance-to-the-target-element/description/?envType=daily-question&envId=2026-04-13

#daily #easy #nopattern
πŸ‘5
Daily (248/373 streak until LC cap)

Interesting problem, but pretty hard to come up with DP recursion here, wasn't intuitive for me.

https://leetcode.com/problems/minimum-total-distance-traveled/description/?envType=daily-question&envId=2026-04-15

#daily #hard #pattern
πŸ‘2