Loading

上一页 1 2 3 4 5 6 7 8 9 ··· 24 下一页
摘要: 题目 代码class MyCircularQueue {public: /** Initialize your data structure here. Set the size of the queue to be k. */ MyCircularQueue(... 阅读全文
posted @ 2019-02-23 15:53 李正浩 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 题目 代码class Solution {public: string reverseWords(string s) { for(int i=0,j=0;j<=s.size();j++) { if(j==s.size()... 阅读全文
posted @ 2019-02-23 12:09 李正浩 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 题目 代码 class Solution {public: void reverseWords(string &s) { if (s.empty()) return; //-----判断是否不包含单词,全是空格 bool isSpace = ... 阅读全文
posted @ 2019-02-23 12:07 李正浩 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 题目 代码 class Solution {public: vector getRow(int rowIndex) { vector array(rowIndex+1); for(int i=0;i 0; j--){ ... 阅读全文
posted @ 2019-02-23 10:24 李正浩 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 题目 代码 class Solution {public: int minSubArrayLen(int s, vector& nums) { if(nums.empty()) return 0; int start=0,e... 阅读全文
posted @ 2019-02-23 09:57 李正浩 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 题目 代码 class Solution {public: int findMaxConsecutiveOnes(vector& nums) { int length=0; int maxLength=0; for(int i=... 阅读全文
posted @ 2019-02-23 09:14 李正浩 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 题目 代码 class Solution {public: int removeElement(vector& nums, int val) { int i = 0, j = 0; while(j != nums.size()) ... 阅读全文
posted @ 2019-02-22 17:08 李正浩 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 题目 代码 class Solution {public: vector twoSum(vector& numbers, int target) { int start=0,end=numbers.size()-1; vector resul... 阅读全文
posted @ 2019-02-22 15:26 李正浩 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 题目 代码 class Solution {public: int arrayPairSum(vector& nums) { std::sort(nums.begin(),nums.end()); int result=0; f... 阅读全文
posted @ 2019-02-22 15:10 李正浩 阅读(334) 评论(0) 推荐(0) 编辑
摘要: 题目 代码class Solution {public: string addBinary(string a, string b) { int lenA = a.length(); int lenB = b.length(); string result; int a... 阅读全文
posted @ 2019-02-22 12:26 李正浩 阅读(139) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 24 下一页