随笔分类 - LeetCode提高班第4期——Facebook面试题专题
摘要:1 class Solution 2 { 3 public: 4 bool isPalindrome(string s) 5 { 6 string str; 7 for(int i = 0;i < s.size();i ++) 8 { 9 if(isdigit(s[i])) str.push_bac
阅读全文
摘要:1 //从nums1后往前依次放置 2 class Solution 3 { 4 public: 5 void merge(vector<int>& nums1, int m, vector<int>& nums2, int n) 6 { 7 int len = m + n - 1; 8 int i
阅读全文
摘要:1 /** 2 * Definition for a binary tree node. 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * TreeNode *right; 7 * TreeNode(int x) : val(x),
阅读全文
摘要:1 /** 2 * Definition for a binary tree node. 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * TreeNode *right; 7 * TreeNode(int x) : val(x),
阅读全文
摘要:1 // Forward declaration of isBadVersion API. 2 bool isBadVersion(int version); 3 4 class Solution 5 { 6 public: 7 int firstBadVersion(int n) 8 { 9 in
阅读全文

浙公网安备 33010602011771号