Solutions and hints:
hint1:to get the all powers of 2 that number consists of - you basically need to get it's binary represantation as this is how binary number works {for each index I in binary representation, the number can be got by SUM( VALUE[I] * 2 ^ I )}
for binary 1011 we get => (1 * 2 ^ 3) (0 * 2 ^ 2) + (1 * 2 ^ 1) + (1 * 2 ^ 0) = 8 + 0 + 2 + 1 = 11.
So first hint is how to get your array - just decompose it's binary representation
hint2:think about how large the array of your num can be, given 1 <= n <= 10^9. Recall 10^ 9 comparing to 2^32, and apply bruteforce.
hint1:
for binary 1011 we get => (1 * 2 ^ 3) (0 * 2 ^ 2) + (1 * 2 ^ 1) + (1 * 2 ^ 0) = 8 + 0 + 2 + 1 = 11.
So first hint is how to get your array - just decompose it's binary representation
hint2:
🔥2
This media is not supported in your browser
VIEW IN TELEGRAM
Decided to take a nap in the office for fun, never did it
🤯5👍1
I guess you might remember demo for Doom 1 or something like that, where AI was generating the next frame?
My friend just shared the Minecraft AI version
https://youtube.com/shorts/ZbaxA5r4k2k?si=pg34NcG4tZU3p6QI
My friend just shared the Minecraft AI version
https://youtube.com/shorts/ZbaxA5r4k2k?si=pg34NcG4tZU3p6QI
YouTube
Digging down in AI Minecraft... #minecraft #ai #aiminecraft
sub if u want.All Socials:Solo.to/zyphron_
Daily.
Today is DP!!
https://leetcode.com/problems/ways-to-express-an-integer-as-sum-of-powers/description/?envType=daily-question&envId=2025-08-12
Hint:uniqueness is ensured same way like when you are generating the combinations in this problem: https://leetcode.com/problems/combinations/description/
#daily
Today is DP!!
https://leetcode.com/problems/ways-to-express-an-integer-as-sum-of-powers/description/?envType=daily-question&envId=2025-08-12
Hint:
#daily
🔥5
I wanted to discuss one thing, about time complexity analysis
SPOILER
SPOILER
SPOILER
SPOILER
SPOILER
SPOILER
SPOILER
SPOILER
Do you see the difference between these 2 DP functions?
I'm a bit БОМБЛЮ because, I have seen a lot of similar problem analysis when authors would name both of these as O(2^n).
FUCK NO. these are different complexities, and today's daily proves it, you can submit it as comb2 and you'll get Time Limit Exceeded.
Without memoization the complexities:
comb time complexity O(2^n), as 2 decisions only
comb2 time complexity is approximately O(n/2 * 2^n) => O(n* 2^n), as on every next call we are doing n - k calls. It will approximate to n / 2, a bit hard to analyse but definitely not pure 2^n
SPOILER
SPOILER
SPOILER
SPOILER
SPOILER
SPOILER
SPOILER
SPOILER
Do you see the difference between these 2 DP functions?
I'm a bit БОМБЛЮ because, I have seen a lot of similar problem analysis when authors would name both of these as O(2^n).
FUCK NO. these are different complexities, and today's daily proves it, you can submit it as comb2 and you'll get Time Limit Exceeded.
Without memoization the complexities:
comb time complexity O(2^n), as 2 decisions only
comb2 time complexity is approximately O(n/2 * 2^n) => O(n* 2^n), as on every next call we are doing n - k calls. It will approximate to n / 2, a bit hard to analyse but definitely not pure 2^n
🤯2
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