随笔分类 -  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 阅读全文
posted @ 2020-04-01 19:48 Jinxiaobo0509 阅读(100) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2020-03-31 11:19 Jinxiaobo0509 阅读(108) 评论(0) 推荐(0)
摘要: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), 阅读全文
posted @ 2020-03-24 12:55 Jinxiaobo0509 阅读(163) 评论(0) 推荐(0)
摘要: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), 阅读全文
posted @ 2020-03-23 15:52 Jinxiaobo0509 阅读(123) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2020-03-21 20:02 Jinxiaobo0509 阅读(112) 评论(0) 推荐(0)