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
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:
β€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
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
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!!
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
Daily leetcode will be performed no matter what!!! Maybe we even do small stream, we will see
β€8
Daily
backtracking sudoku (hard)
https://leetcode.com/problems/sudoku-solver/description/?envType=daily-question&envId=2025-08-31
#daily
backtracking sudoku (hard)
https://leetcode.com/problems/sudoku-solver/description/?envType=daily-question&envId=2025-08-31
#daily
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.
I'm under kynedryl, so completely zoned out.
In general - we try every possible number, until we reach the end. If we reached the end - it is solved.
β€4
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.
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
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β¦
YouTube
I fuck your bullshit !
Shit!
π6
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?