摘要:
1 class Solution { 2 public: 3 int titleToNumber(string s) { 4 int n=s.size(),i; 5 int ans=0; 6 for(i=0;i<n;i++) 7 ... 阅读全文
摘要:
1 class Solution { 2 public: 3 int majorityElement(vector& nums) { 4 int n=nums.size(),i; 5 int m=nums[0]; 6 int cnt=1; 7... 阅读全文
摘要:
1 class Solution { 2 public: 3 string convertToTitle(int n) { 4 string ans="",cur; 5 while(n) 6 { 7 n--; 8 ... 阅读全文
摘要:
1 class Solution { 2 public: 3 void rotate(vector& nums, int k) { 4 int n=nums.size(); 5 k%=n; 6 if(k==0) 7 ... 阅读全文
摘要:
1 class Solution { 2 public: 3 uint32_t reverseBits(uint32_t n) { 4 uint32_t ans=0; 5 int t=0; 6 while(n) 7 { 8 ... 阅读全文