andreyka26_se
1.15K subscribers
1.13K photos
144 videos
7 files
627 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
Daily (324/373 streak until LC cap)

Easy if using O(n^2) or built-in function. But pretty tough if using some special algo like KMP.

https://leetcode.com/problems/number-of-strings-that-appear-as-substrings-in-word/description/?envType=daily-question&envId=2026-06-29

#daily #easy #nopattern
2
Warm up for Concurrency / Multithreading in System design. Let's say we have plane seat booking system like Kiwi or event booking system like Ticket master.

The domain is simple, multiple users might click on the same seat and double book it. Solution: lock the seat for 10 minutes and allow single user to proceed with payment or timeout before others can lock it as well.
🔥5
andreyka26_se
Warm up for Concurrency / Multithreading in System design. Let's say we have plane seat booking system like Kiwi or event booking system like Ticket master. The domain is simple, multiple users might click on the same seat and double book it. Solution: lock…
The reason for double booking problem here.

We are assume our backend is multithreaded, however even in single threaded nodejs, the same thing can happen because of different network delays.

- 2 threads read the seat, and see status = "available", which means we can write "reserved".
- both threads are writing 'reserved' and putting their customer that is doing the request.
- you see that red customer2 (red) overrides whatever was written by customer1 (blue). However customer1 (blue) got successful write, no errors, nothing.
2
andreyka26_se
The reason for double booking problem here. We are assume our backend is multithreaded, however even in single threaded nodejs, the same thing can happen because of different network delays. - 2 threads read the seat, and see status = "available", which…
you might think: yea, just let's do serializable isolation on database (single thread) and single thread of the app (async nodejs for example), and it will work

well.... no it won't.

For one threaded app. We can serially (single threaded manner) send requests to database, but due to I/O asynchrony, we might still end up in situation that both thread1 and thread2 read the data before any of them write anything.

For one threaded storage (can be Redis for example). Since 2 reads will happen before writes -> they will still return available, and then we just sequentially write the data as in the diagram.

So here neither single threaded app, not single threaded storage saves us.
2
andreyka26_se
you might think: yea, just let's do serializable isolation on database (single thread) and single thread of the app (async nodejs for example), and it will work well.... no it won't. For one threaded app. We can serially (single threaded manner) send requests…
So remember, whenever you have race conditions situation in your system design, blindly "read data by application, make decision in application and then write back to storage" does not work.

You will need to use some additional things to make it work, and we are going to talk about it in the article that currently "work in progress"
👍7🔥2
Daily (325/373 streak until LC cap)

Not bad problem, has well known pattern that I haven't seen for a very long time in daily problems. Definitely recommended. It is not hard

https://leetcode.com/problems/number-of-substrings-containing-all-three-characters/description/?envType=daily-question&envId=2026-06-30

#daily #medium #pattern
🔥6
andreyka26_se
Video
This media is not supported in your browser
VIEW IN TELEGRAM
🔥20👍6
Daily 326 streak

Nice problem, graphs (in some sense), not very very hard, but pretty tough. Recommend, it uses 2 common patterns.

https://leetcode.com/problems/find-the-safest-path-in-a-grid/description/?envType=daily-question&envId=2026-07-01

#daily #medium #pattern
2
This media is not supported in your browser
VIEW IN TELEGRAM
1
Feel sorry for overheated EU, but here it is cold enough to make me wear jacket at night, now 17 degrees + wind. Amazing summer, love it in Dublin
5
Daily 327th day streak

Exactly same pattern as was yesterday, just a bit different problem semantics. Definitely worth of recalling the patterns, as they are used in the interviews.

https://leetcode.com/problems/find-a-safe-walk-through-a-grid/description/?envType=daily-question&envId=2026-07-02

#daily #medium #pattern
3
Please open Telegram to view this post
VIEW IN TELEGRAM
andreyka26_se
Just checking if it is me who didn't know, or it is for majority of the people
this is one of bunch of interesting things that are used in my current project in a very tricky manner, by ex-googlers.

I now have exactly same vibe/feeling as I had at my first company (2018, small 60 people outsource company), where I had techlead with 10+ years of experience, with already rejected Amazon and Microsoft offers: everything looks unknown and/or complicated, you overloading your brain with a lot of stuff that you are supposed to know. Understanding that people around are quite fluent in in it comparing to you hurts even more.
👍4