319_BulbSwitcher - a920604a/leetcode GitHub Wiki
title: 319. Bulb Switcher tags: - Math categories: leetcode comments: false
problem
solution
class Solution {
public:
int bulbSwitch(int n) {
return sqrt(n);
}
};
analysis
- time complexity
O(1)
- space complexity
O(1)