2017年11月6日

摘要: 阅读全文
posted @ 2017-11-06 16:12 叶尘 阅读(205) 评论(0) 推荐(0)

2017年11月5日

摘要: class Solution {public: /* * @param n: non-negative integer, n posts * @param k: non-negative integer, k colors * @return: an integer, the total numbe 阅读全文
posted @ 2017-11-05 23:17 叶尘 阅读(118) 评论(0) 推荐(0)
 
摘要: class Solution {public: /* * @param A: An array of Integer * @return: an integer */ int longestIncreasingContinuousSubsequence(vector<int> &A) { // wr 阅读全文
posted @ 2017-11-05 23:16 叶尘 阅读(88) 评论(0) 推荐(0)
 
摘要: class Solution {public: /* * @param obstacleGrid: A list of lists of integers * @return: An integer */ int uniquePathsWithObstacles(vector<vector<int> 阅读全文
posted @ 2017-11-05 23:13 叶尘 阅读(104) 评论(0) 推荐(0)
 
摘要: class Solution {public: /* * @param m: positive integer (1 <= m <= 100) * @param n: positive integer (1 <= n <= 100) * @return: An integer */ int uniq 阅读全文
posted @ 2017-11-05 23:10 叶尘 阅读(111) 评论(0) 推荐(0)
 
摘要: 当爬第k阶楼梯时,有可能是从第k-1或k-2阶楼梯上过去的,所以到达第k阶楼梯的方法为到达第k-1与k-2阶楼梯的方法之和 class Solution {public: /** * @param n: An integer * @return: An integer */ int climbSta 阅读全文
posted @ 2017-11-05 23:08 叶尘 阅读(102) 评论(0) 推荐(0)
 
摘要: class Solution {public: /* * @param grid: a list of lists of integers * @return: An integer, minimizes the sum of all numbers along its path */ int mi 阅读全文
posted @ 2017-11-05 23:04 叶尘 阅读(100) 评论(0) 推荐(0)
 
摘要: class Solution {public: /* * @param triangle: a list of lists of integers * @return: An integer, minimum path sum */ int minimumTotal(vector<vector<in 阅读全文
posted @ 2017-11-05 23:02 叶尘 阅读(102) 评论(0) 推荐(0)
 
摘要: class Solution {public: /* * @param : a string to be split * @return: all possible split string array */ vector<vector<string>> splitString(string& s) 阅读全文
posted @ 2017-11-05 23:00 叶尘 阅读(116) 评论(0) 推荐(0)
 
摘要: 因只有一个元素只出现一次,其他元素均是两次。所以排序后,对相邻两元素不重复的进行比较,如果有不相等的,则相邻两元素中的前一个元素为落单的数。 class Solution {public: /* * @param A: An integer array * @return: An integer * 阅读全文
posted @ 2017-11-05 22:56 叶尘 阅读(156) 评论(0) 推荐(0)