319. Bulb Switcher 發表於 2023-02-13 | 分類於 leetcode problemsolution123456class Solution {public: int bulbSwitch(int n) { return sqrt(n); }}; analysis time complexity O(1) space complexity O(1)