摘要:
given an integer,write a function to determine if it is a power of three.class Solution {public: bool isPowerOfThree(int n) { if(n<1) return... 阅读全文
摘要:
Problem:Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements.For examp... 阅读全文
摘要:
Problem:There are n bulbs that are initially off. You first turn on all the bulbs. Then, you turn off every second bulb. On the third round, you toggl... 阅读全文