🚀 Day 15 of #100DaysOfLeetCode 🚀
Today, I tackled the Bulb Switcher problem on LeetCode! 💡 The challenge was to figure out how many bulbs remain on after a series of toggling operations. It was interesting to observe the pattern that emerges with each round of toggling.I just returned the sqrt of that number simple solution yet it beats the time complexity and the space compexity
🔍 Problem Summary: There are n bulbs initially off, and after turning on all of them, every second, third, and subsequent round of toggling follows certain rules. The task was to return how many bulbs are still on after the final round.
💡 Example: Input: n = 3
Output: 1
Explanation: After toggling, only 1 bulb remains on!
Check it out here: Bulb Switcher Problem
https://lnkd.in/g6JWQvMd
Proud to keep the momentum going! 💪💻 #LeetCode #ProblemSolving #CodingChallenge #Day15 #100DaysOfCode
Top 92% toddle Developer — Visit toddle.dev 🚀
3wThis is going to be super nice ✌️🙂