上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 54 下一页

2019年6月4日

摘要: opencv-split Divides a multi-channel array into several single-channel arrays. code 参考 1. opencv_split; 完 阅读全文
posted @ 2019-06-04 14:58 鹅要长大 阅读(161) 评论(0) 推荐(0) 编辑
摘要: problem 581. Shortest Unsorted Continuous Subarray 题意:感觉题意理解的不是非常明白。 solution1: 使用一个辅助数组,新建一个跟原数组一模一样的数组,然后排序。从数组起始位置开始,两个数组相互比较,当对应位置数字不同的时候停止,同理再从末尾 阅读全文
posted @ 2019-06-04 14:40 鹅要长大 阅读(183) 评论(0) 推荐(0) 编辑
摘要: problem 577. Employee Bonus 参考 1. Leetcode_easy_$_577. Employee Bonus; 2. https://www.cnblogs.com/lightwindy/p/9698931.html; 完 阅读全文
posted @ 2019-06-04 14:37 鹅要长大 阅读(462) 评论(0) 推荐(0) 编辑

2019年6月3日

摘要: problem 575. Distribute Candies 理解题意:主要是计算candies的种类数。 如果大于candies数目的一半,则返回一半的值,否则,返回candies的种类数。 solution1: 注意掌握set的用法; solution2: re 1. Leetcode_eas 阅读全文
posted @ 2019-06-03 22:30 鹅要长大 阅读(111) 评论(0) 推荐(0) 编辑
摘要: problem 572. Subtree of Another Tree re 1. Leetcode_easy_572. Subtree of Another Tree; end 阅读全文
posted @ 2019-06-03 22:29 鹅要长大 阅读(186) 评论(0) 推荐(0) 编辑
摘要: problem 566. Reshape the Matrix solution solution2 re 1. Leetcode_easy_566. Reshape the Matrix; 2. Grandyang; end 阅读全文
posted @ 2019-06-03 22:07 鹅要长大 阅读(125) 评论(0) 推荐(0) 编辑
摘要: problem 563. Binary Tree Tilt re 1. Leetcode_easy_563. Binary Tree Tilt; end 阅读全文
posted @ 2019-06-03 22:06 鹅要长大 阅读(160) 评论(0) 推荐(0) 编辑
摘要: problem 561. Array Partition I solution re 1. Leetcode_easy_561. Array Partition I; 2. Grandyang; end 阅读全文
posted @ 2019-06-03 21:59 鹅要长大 阅读(82) 评论(0) 推荐(0) 编辑
摘要: problem 559. Maximum Depth of N-ary Tree re 1. Leetcode_easy_559. Maximum Depth of N-ary Tree; end 阅读全文
posted @ 2019-06-03 21:57 鹅要长大 阅读(160) 评论(0) 推荐(0) 编辑

2019年5月31日

摘要: problem 558. Quad Tree Intersection re 1. Leetcode_easy_558. Quad Tree Intersection; 2. Grandyang; end 阅读全文
posted @ 2019-05-31 13:43 鹅要长大 阅读(155) 评论(0) 推荐(0) 编辑
摘要: problem 557. Reverse Words in a String III solution1:字符流处理类istringstream. solution2:单词首尾指针。 参考 1. Leetcode_easy_557. Reverse Words in a String III; 2. 阅读全文
posted @ 2019-05-31 09:29 鹅要长大 阅读(247) 评论(0) 推荐(0) 编辑

2019年5月30日

摘要: problem 551. Student Attendance Record I 题意: solution: 理解题意很简单,重要的是其中的逻辑怎么实现。还有一点需要注意自加自减运算,感觉还是有点不熟练。。 参考 1. Leetcode_easy_551. Student Attendance Re 阅读全文
posted @ 2019-05-30 10:05 鹅要长大 阅读(177) 评论(0) 推荐(0) 编辑

2019年5月29日

摘要: problem 543. Diameter of Binary Tree 题意: 转换一种角度来看,是不是其实就是根结点1的左右两个子树的深度之和呢。那么我们只要对每一个结点求出其左右子树深度之和,这个值作为一个候选值,然后再对左右子结点分别调用求直径对递归函数,这三个值相互比较,取最大的值更新结果 阅读全文
posted @ 2019-05-29 13:08 鹅要长大 阅读(209) 评论(0) 推荐(0) 编辑
摘要: problem 541. Reverse String II 题意: 给定一个字符串,每隔k个字符翻转这k个字符,剩余的小于k个则全部翻转,否则还是只翻转剩余的前k个字符。 solution1: solution2: 简洁版 就是每2k个字符来遍历原字符串s,然后进行翻转,翻转的结尾位置是取i+k和 阅读全文
posted @ 2019-05-29 10:29 鹅要长大 阅读(144) 评论(0) 推荐(0) 编辑
摘要: problem 538. Convert BST to Greater Tree 参考 1. Leetcode_easy_538. Convert BST to Greater Tree; 完 阅读全文
posted @ 2019-05-29 10:22 鹅要长大 阅读(141) 评论(0) 推荐(0) 编辑

2019年5月28日

摘要: problem 532. K-diff Pairs in an Array 题意:统计有重复无序数组中差值为K的数对个数。 solution1: 使用映射关系; 统计数组中每个数字的个数。我们可以建立每个数字和其出现次数之间的映射,然后遍历哈希表中的数字,如果k为0且该数字出现的次数大于1,则结果r 阅读全文
posted @ 2019-05-28 09:31 鹅要长大 阅读(183) 评论(0) 推荐(0) 编辑

2019年5月27日

摘要: //IHostMemory *gieModelStream {nullptr}; //const char* prototxt = "./googlenet/test_20181010.prototxt";//argv[1]; //const char* caffemodel = "./googlenet/lane_area_lx1890_iter_320000_20... 阅读全文
posted @ 2019-05-27 16:31 鹅要长大 阅读(211) 评论(0) 推荐(0) 编辑
摘要: problem 530. Minimum Absolute Difference in BST 参考 1. Leetcode_easy_530. Minimum Absolute Difference in BST; 2. Grandyang_二叉搜索树的最小绝对差; 完 阅读全文
posted @ 2019-05-27 14:01 鹅要长大 阅读(145) 评论(0) 推荐(0) 编辑
摘要: problem 521. Longest Uncommon Subsequence I 最长非共同子序列之一 题意: 两个字符串的情况很少,如果两个字符串相等,那么一定没有非共同子序列,反之,如果两个字符串不等,那么较长的那个字符串就是最长非共同子序列。 solution: or 参考 1. Lee 阅读全文
posted @ 2019-05-27 13:48 鹅要长大 阅读(127) 评论(0) 推荐(0) 编辑
摘要: problem 520. Detect Capital 题意: 题目中给出的三种情况,分别是全是大写、全是小写、首字母大写,这三种情况返回True;否则返回False; solution: 参考 1. Leetcode_520. Detect Capital; 完 阅读全文
posted @ 2019-05-27 13:32 鹅要长大 阅读(194) 评论(0) 推荐(0) 编辑
上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 54 下一页

导航