摘要:
1. class Solution { public: bool isPowerOfTwo(int n) { if(n<=0) return false; while(n!=1) { if(n%2) return false; n/=2; } return true; } }; 2. 如果是2的倍数 阅读全文
摘要:
https://www.cnblogs.com/grandyang/p/4570699.html class Solution { public: int calculate(string s) { int sign=1,res=0,n=s.size(); stack<int> sta; for(i 阅读全文