andreyka26_se
1.15K subscribers
1.13K photos
144 videos
7 files
626 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
Small introduction for new 200 people. So, I'm Andrii, next month will be 8 years since I started making money out of software engineering. I'm originally from Ukraine and started my path as a Junior .NET developer at a small outsource company in 2018. I…
Hello all new people, probably from Anna's meet, if you are from somewhere else - pls do let me know, maybe I should say kudos to somebody else.

Quick intro about the channel, and what we are doing here is in "replied".
🔥72
We are 1000🥳. Thanks for being with me, appreciate it, you are my motivation to move forward, develop and show you something interesting/useful, as well as, mental health booster / loneliness solution, as sometimes it is hard in immigration. We'll do stream for that soon, will talk about stuff, etc, in few weeks.

Telegram has even unlocked some new features I didn't knew about. We'll do something.
2🔥167
Now there is going to be bunch of skipped daily leetcode qs that I was solving all that time but never posted. You can skip up until it will be the last one which is today:

1846. Maximum Element After Decreasing and Rearranging
🔥2
Daily (316/373 streak until LC cap)

The problem explicitly asks for counting sort -> so just perceive it as good counting sort reminder.

#daily #medium #pattern
1
Daily (317/373 streak until LC cap)

Pretty easy, but cool problem for challenging some of the leetcode problems. Recommended. Also it is special case of this problem https://leetcode.com/problems/rearrange-characters-to-make-target-string/submissions/2049315140/.
So you can solve 2 problems with one codebase.

https://leetcode.com/problems/maximum-number-of-balloons/description/?envType=daily-question&envId=2026-06-28

#daily #easy #pattern
1
Daily (318/373 streak until LC cap)

This is hedge fund level of problems. Do not recommend, bullshit and useless.

https://leetcode.com/problems/number-of-zigzag-arrays-i/description/?envType=daily-question&envId=2026-06-28

#daily #hard #nopattern
1
Daily (319/373 streak until LC cap)

Same as prev one, but tighter constraints. Again, don't recommend, it is the problem they ask in hedge fund, not in FAANGs.

https://leetcode.com/problems/number-of-zigzag-arrays-ii/description/?envType=daily-question&envId=2026-06-28

#daily #hard #nopattern
1
Daily (320/373 streak until LC cap)

Easy one for bruteforce, pretty hard for the optimized O(n) solution. But bruteforce will pass here.

https://leetcode.com/problems/count-subarrays-with-majority-element-i/description/?envType=daily-question&envId=2026-06-28

#daily #medium #pattern
1
Daily (321/373 streak until LC cap)

Same as previous problem, but tighter constraints. You will need to remember some variation of Boyer–Moore algo with additional things on top. Pretty complicated one

#daily #hard #pattern
1
Daily (323/373 streak until LC cap)

Now today's problem (all previous ones where for my long time away)

This one is pretty easy, I would rate it as easy. Go for it.


https://leetcode.com/problems/maximum-element-after-decreasing-and-rearranging/description/?envType=daily-question&envId=2026-06-28

#daily #medium #nopattern
1
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