Today's daily is chill one, easy:
Brute force will fit.
https://leetcode.com/problems/power-of-three/?envType=daily-question&envId=2025-08-13
#daily
Brute force will fit.
https://leetcode.com/problems/power-of-three/?envType=daily-question&envId=2025-08-13
#daily
👍5
Follow up in constant time O(1).
We take the maximum possible power of 3 num in the constraints `n <= 2^31 - 1`.
And then if number is positive - check if the reminder will be zero
If you have only 1 run, then, yeah, you might calculate all power of 3, put them to map, and then in constant time chech if n is in map
And then if number is positive - check if the reminder will be zero
🔥3🤯2❤1
At MS at my project, we are trying to stick to Scrum, but in reality it is something hybrid.
So, we usually don't have any estimations, if we do - these estimations on big features, and they are estimated in weeks. A lot of work load so a lot of reprioritization.
I was just checking my tasks, some of them were very old, and this is the outcome
- some repair item to fix the pipeline -> we migrated to new pipeline, so it is autoclosed
- some cleanup for skype related migration -> skype is done, so autoclosed,
...
I like how big corpo works xDD I closed a lot of shit by doing really nothing today
So, we usually don't have any estimations, if we do - these estimations on big features, and they are estimated in weeks. A lot of work load so a lot of reprioritization.
I was just checking my tasks, some of them were very old, and this is the outcome
- some repair item to fix the pipeline -> we migrated to new pipeline, so it is autoclosed
- some cleanup for skype related migration -> skype is done, so autoclosed,
...
I like how big corpo works xDD I closed a lot of shit by doing really nothing today
😁4
Got this recommendation, omg Eloy is legend:
https://youtu.be/3dD_8ztcwto?t=148
https://youtu.be/3dD_8ztcwto?t=148
YouTube
ELOY CASAGRANDE | DUALITY - SLIPKNOT LIVE AT GRASPOP METAL METTING
Slipknot Live in Dessel, Belgium - 06/20
_____________________
► Audio: EAD10 - Yamaha
► Video: Iphone 14 Pro
_____________________
Follow me on social media:
► New Website: https://www.eloycasagrande.com/
► Instagram: https://www.instagram.com/eloycasagrande/…
_____________________
► Audio: EAD10 - Yamaha
► Video: Iphone 14 Pro
_____________________
Follow me on social media:
► New Website: https://www.eloycasagrande.com/
► Instagram: https://www.instagram.com/eloycasagrande/…
but in the old times, Microsoft also had good offering
https://youtu.be/3Kaz3qsR3VA?t=158
https://youtu.be/3Kaz3qsR3VA?t=158
YouTube
The Gs: Duality
Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.
🔥2
Daily
Today is chill again, easy one, low constraints, not hard to solve
https://leetcode.com/problems/largest-3-same-digit-number-in-string/?envType=daily-question&envId=2025-08-14
#daily
Today is chill again, easy one, low constraints, not hard to solve
https://leetcode.com/problems/largest-3-same-digit-number-in-string/?envType=daily-question&envId=2025-08-14
#daily
Solutions
- "sliding window" based
- opposite - apply contains() to all of the possible candidates (10)
Both O(n) time and O(1) space, as these candidates are considered as constant (10 items)
- opposite - apply contains() to all of the possible candidates (10)
❤2
andreyka26_se
Amazon has bipolar disorder. Yesterday's evening I got an email
btw, even if you are not looking for job - it is always a good idea to interview, at least it works like that for me. Some challenge, some confirmation of your skills, etc. Never rejected single opportunity even if not looking for something new
❤8👍1
So, lets do stream on Saturday this time. Again, it is going to be stream about DP, how to do top down and convert to bottom up + memory optimization.
Also we are going to implement sharding of all popular storages: Redis, dynamo, cassandra, etc
Also we are going to implement sharding of all popular storages: Redis, dynamo, cassandra, etc
🔥9❤1
Daily
Yesterday it was power of 3, and it was easier
https://leetcode.com/problems/power-of-four/description/?envType=daily-question&envId=2025-08-15
Yesterday it was power of 3, and it was easier
https://leetcode.com/problems/power-of-four/description/?envType=daily-question&envId=2025-08-15
❤3
Do you remember we were talking about Messenger or Presence Service System design?
There was a problem: how to keep hundreds of millions clients on websockets? I loooked up some stuff, and this is basically the solution (high level) that works in production.
We basically do not need any web socket server manager. WebSocket node itself will manage the state in Redis. That is it.
There was a problem: how to keep hundreds of millions clients on websockets? I loooked up some stuff, and this is basically the solution (high level) that works in production.
We basically do not need any web socket server manager. WebSocket node itself will manage the state in Redis. That is it.
🔥5
Websocket server and client ping each other. If connection is getting timed out - client will initiate reconnect which will override the data about itself in Redis.
❤2
Do you remember distributed lock system design pattern? Basically one of the most famous algos is RedLock - implementation based on Redis (you do atomic set with TTL claiming the lock and the atomically removing the record).
So, this solution actually has a lot of critic, and one of the critics is done by Martin Kleppmann (this guy who wrote Designing data intensive applications)
https://martin.kleppmann.com/2016/02/08/how-to-do-distributed-locking.html
So, this solution actually has a lot of critic, and one of the critics is done by Martin Kleppmann (this guy who wrote Designing data intensive applications)
https://martin.kleppmann.com/2016/02/08/how-to-do-distributed-locking.html
❤2
So, the guy who created RedLock algo made A DISS ON MARTIN.
THIS IS SO FUNNY AND EPIC IN A SENSE
DISTRIBUTED BATTLE
THIS IS SO FUNNY AND EPIC IN A SENSE
DISTRIBUTED BATTLE