andreyka26_se
610 subscribers
575 photos
66 videos
6 files
286 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
Stream today?
πŸ‘4
In 5 mins
This media is not supported in your browser
VIEW IN TELEGRAM
1❀6
Daily

https://leetcode.com/problems/alice-and-bob-playing-flower-game/description/?envType=daily-question&envId=2025-08-29

Usually when I see Alice and Bob I want them to fucking grow up and stop playing the game, but this time it is not that hard task:

think of it as this, no matter what number of flowers are on the lanes, both Alice and Bob will be picking from either of them, so you can imagine it as just bunch of flowers consisting of x + y sub bunches.

Hint: if the number of flowers is even - then Alice will loose, if number of flowers is odd - Alice will win
❀3
Solution

Official solution is one liner, but I guess mine is a bit easier to understnd.

So we have 2 numbers, we need to count all the pairs that will result to odd sum.

In this case, we get all odd numbers in n (fix it in the way) and multiply by the number of even numbers forming this (oddnumber, evennumber)
Then we switch and count the same but vice versa (evennumber, oddnumber)

Then we sum, and this is the solution
Friday Starcraft?)))
❀7πŸ‘1
Tomorrow going for my first vacation maybe in 3 years, where I'm not going for interview onsite or something like that. And hopefully I will get to some sea (if we don't crush in airplane).

And soon will tell you story about kiwi and Croatian airlines. THe stupidest shit ever happened on this kind of service. I mean, I literally wanted to tell their support: pay me my 30$/h and I will show you how these services should be designed, implemented AND TESTED!!
😁10πŸ‘1πŸ€”1
BUT,

Daily leetcode will be performed no matter what!!! Maybe we even do small stream, we will see
❀8
This media is not supported in your browser
VIEW IN TELEGRAM
Media is too big
VIEW IN TELEGRAM
Morning LC
❀10
Solution

I'm under kynedryl, so completely zoned out. I made up some backtracking solution, it is not the best, ofc, but it passes.
In general - we try every possible number, until we reach the end. If we reached the end - it is solved.
❀4
Now better, much better
As the guy, who already had 5 surgeries, and knows what is it random health shit - stating rn: β€œI fuck your bullshit shit”. First day, I somehow stepped in the stone in the sea, and injured toe, cause it was slippery and I unsuccessfully stepped somehow and got injury. Now I cannot walk properly.

Not stating, that flight got cancelled 15h before, so we had to do flight with stops , and pay extra for this.

Like man, wtf is this. Now in worst case I will go to ambulance locally, average case will be almost not walking, and best case 1-2 days and it will recover enogh. Like doc and gpt tells me it is not that serious, can wait 4-5 days until I go back, but fuck, what a luck.
🀯4
andreyka26_se
https://youtu.be/kFRAQO-JE9M?si=mEBVhmjeTQJ1Tbzp
Literally me cursing all this β€œlucky” shit, but mostly health. Idk it is ridiculously randomized in a bad way somehow during the life. Is it only me?