- 博客(3)
- 资源 (2)
- 收藏
- 关注
原创 leet code—— 对撞指针125,344,345,11
125Input: "A man, a plan, a canal: Panama"Output: true判断一个字符串是不是回文串class Solution { public: bool isPalindrome(string s) { if ( s.length() == 0 || s.length() == 1) return true; int l = 0; i...
2018-04-30 20:09:01 319
原创 leetcode——88,215
88 合并两个有序数组方法一:直接使用sort() 打败了26.11%的人class Solution { public: void merge(vector<int>& nums1, int m, vector<int>& nums2, int n) { int index = m; for (int i = 0; i < n; i...
2018-04-30 16:21:15 114
原创 leetcode——27,26,80
27题#include <iostream> #include<string> #include<iostream> #include<vector> #include<algorithm> using namespace std; class Solution { public: int removeElement(vector&...
2018-04-30 11:01:44 124
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人