andreyka26_se
606 subscribers
622 photos
66 videos
6 files
315 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
Daily (117 day streak)

Interesting problem, I wouldn't say it is hard, simulation will work, the trick here to write a good simulation, or figure out smart algo

https://leetcode.com/problems/count-collisions-on-a-road/description/?envType=daily-question&envId=2025-12-04

#daily #medium
πŸ‘2
Daily (119 day streak)

This could have been typical dynamic programming problem for 5 mins, BUT, by 38% acceptance rate + people scresming that it should be hard one - now it is not that easy.

Spoiler, O(n^2) will give TLE. We need something more optimized here. Didn't come up with it yet, will do tomorrow after sleep

https://leetcode.com/problems/count-partitions-with-max-min-difference-at-most-k/description/?envType=daily-question&envId=2025-12-06

#daily #medium
πŸ‘1
πŸ‘3
Approve this approach XDDDD. Now similar cases in real life xD
😁7πŸ‘1
Daily (122 day streak)

Happy Tuesday, actually amazing problem, exactly how medium should be. Enjoyed it, however I have read the first hint to get the idea behind the map usage.


https://leetcode.com/problems/count-special-triplets/description/?envType=daily-question&envId=2025-12-09


#daily #medium
πŸ‘4
Youtube introduced A/B testing for titles, and I guess thumbnails. Niiiice. Extremely good feature
πŸ‘1
Daily (123 day streak)

Happy Wednesday. Today is interesting problem. The kind of problem, when you need to figure out few things and then solution is really trivial. For me was a bit hard to understand what is needed.

Initially I thought that we count dependency chain. E.g. in the 1st example, [0,1,2] => means pc1 was unlocked from pc0, pc2 was unlocked from pc1. IT IS NOT.
THE ASK HERE IS to count the order of computers being unlocked. So [0,1,2] => also means pc1 was unlocked from pc1, and pc2 was unlocked from pc0.

Testcase [2,68,61], expected number of permutations is 2

https://leetcode.com/problems/count-the-number-of-computer-unlocking-permutations/description/?envType=daily-question&envId=2025-12-10

#daily #medium
πŸ‘1πŸ”₯1
During the daily, I discovered interesting compiler optimization or whatever it is.

Case1. I'm using permutations *= cnt % mod => gives 3600ms
Case2. I'm using permutations = permutations * cnt % mod => gives 11ms
πŸ€”3
andreyka26_se
During the daily, I discovered interesting compiler optimization or whatever it is. Case1. I'm using permutations *= cnt % mod => gives 3600ms Case2. I'm using permutations = permutations * cnt % mod => gives 11ms
UPD:

permutations *= cnt -> 3000ms
permutations = permutations * cnt -> 3000ms
permutations = permutations * cnt % mod -> 17ms
permutations = (permutations * cnt) % mod -> 17ms
permutations *= cnt % mod -> 3000ms



For now seems strange
πŸ€”1
andreyka26_se
UPD: permutations *= cnt -> 3000ms permutations = permutations * cnt -> 3000ms permutations = permutations * cnt % mod -> 17ms permutations = (permutations * cnt) % mod -> 17ms permutations *= cnt % mod -> 3000ms For now seems strange
Actually makes sense. The smaller the numbers the quicker the multiplication.

p *= cnt % mod will be converted to p = p * (cnt % mod). So basically we will always work with bigger numbers

Order of operations isfrom left to right for β€˜*’ and β€˜%’ as they are same β€œrank”
πŸ‘1🀯1
Daily (124 day streak)

Happy Thursday. Amazing problem, I love problems that are representing some abstract model, that you can imagine, or even better - real world model, rather than just some numbers. Today is exactly that type of problems

https://leetcode.com/problems/count-covered-buildings/description/?envType=daily-question&envId=2025-12-11

#daily #medium
πŸ‘3
Fun fact, did you know you can add contributions/commits to github for the past and for future days. E.g. just added for 24th of Dec.

My ex techlead has shared the fun repo, and I was really doubting how it can add for the past or for the future, but it can for new empty repo

https://github.com/Shpota/github-activity-generator
πŸ”₯2
Well actually even in already created repo, you can do it, and it will be reflected in activity.

Here I created commit in 2026th.

But you would need to play with query parameters in github so it is shown:

https://github.com/andreyka26-git?tab=overview&from=2025-12-01&to=2026-12-11
πŸ”₯2😁1
I love Google ecosystem for personal use, Tasks, Calendar, Keep (notes), Drive/Docs, etc.

The only one thing I was not happy about Google Notes (Keep) is rich text editing (bold, italic formats, headings, etc).

THEY HAVE ADDED IT!!!

Was waiting for it for 3-4 years. On top of that every now and then I see improvements and new features for Google Tasks.

Love Google. At some point I will be hired there. Want to work on some of these personal / time management tools.
πŸ”₯12
Daily (125 day streak)

Actually nice problem. Feels like some version of real engineering problem that somebody had.

https://leetcode.com/problems/count-mentions-per-user/description/?envType=daily-question&envId=2025-12-12

#daily #medium
πŸ‘2
Daily (126 day streak)

Happy Saturday. Today is easy, so few mins problem - get your coin.

https://leetcode.com/problems/coupon-code-validator/?envType=daily-question&envId=2025-12-13

#daily #easy
πŸ”₯2