10 2020 档案

【leetcode_easy】1475. Final Prices With a Special Discount in a Shop
摘要:leetcode_easy_array problem 1475. Final Prices With a Special Discount in a Shop solution #1: 使用新数组更新数据; code solution #2: 直接在原数组更新数据; code: 注意: 1. 满足 阅读全文

posted @ 2020-10-29 22:50 鹅要长大 阅读(62) 评论(0) 推荐(0) 编辑

【leetcode_easy】1486. XOR Operation in an Array
摘要:leetcode_easy_array problem 1486. XOR Operation in an Array solution #1: code: 参考 1. leetcode_1486. XOR Operation in an Array; 完 阅读全文

posted @ 2020-10-29 22:41 鹅要长大 阅读(66) 评论(0) 推荐(0) 编辑

【leetcode_easy】1491. Average Salary Excluding the Minimum and Maximum Salary
摘要:leetcode_easy_array 1491. Average Salary Excluding the Minimum and Maximum Salary solution #1: code solution #2: code 注意: 1. 去除最大最小值之后的平均值; 2. 数组元素是un 阅读全文

posted @ 2020-10-28 08:13 鹅要长大 阅读(116) 评论(0) 推荐(0) 编辑

【leetcode_easy】1480. Running Sum of 1d Array
摘要:leetcode_easy_array problem 1480. Running Sum of 1d Array solution #1: code: 参考 1. leetcode_1480. Running Sum of 1d Array; 完 阅读全文

posted @ 2020-10-28 08:11 鹅要长大 阅读(74) 评论(0) 推荐(0) 编辑

【leetcode_easy】1470. Shuffle the Array
摘要:leetcode_easy_array problem 1470. Shuffle the Array solution #1: code solution #2: code 注意: 1. vector; first, last Input iterators to the initial and 阅读全文

posted @ 2020-10-28 08:08 鹅要长大 阅读(144) 评论(0) 推荐(0) 编辑

【leetcode_easy】1464. Maximum Product of Two Elements in an Array
摘要:leetcode_easy_array 1464. Maximum Product of Two Elements in an Array solution #1: code: 参考 1. leetcode_1464. Maximum Product of Two Elements in an Ar 阅读全文

posted @ 2020-10-27 23:13 鹅要长大 阅读(39) 评论(0) 推荐(0) 编辑

【leetcode_medium】18. 4Sum
摘要:leetcode_medium_array problem 18. 4Sum solution #1: code 注意: 1. 和3Sum的题目思路基本一致,多了一层循环,使用双指针; 参考 1. leetcode_18. 4Sum; 2. Grandyang; 完 阅读全文

posted @ 2020-10-27 23:12 鹅要长大 阅读(57) 评论(0) 推荐(0) 编辑

【leetcode_medium】16. 3Sum Closest
摘要:leetcode_medium_array problem 16. 3Sum Closest solution #1: 三重循环; code: solution #2: 排序后通过双指针移动确定; code 参考 1. leetcode_16. 3Sum Closest; 完 阅读全文

posted @ 2020-10-27 23:10 鹅要长大 阅读(57) 评论(0) 推荐(0) 编辑

【leetcode_medium】11. Container With Most Water
摘要:leetcode_medium_array problem 11. Container With Most Water solution #1: code 参考 1. leetcode_11. Container With Most Water; 完 阅读全文

posted @ 2020-10-27 23:09 鹅要长大 阅读(70) 评论(0) 推荐(0) 编辑

【leetcode_medium】15. 3Sum
摘要:leetcode_medium_array problem 15. 3Sum 注意: 1. 题目要求的没有重复的三元组,是指三元组是不同的,但是三元组的元素是可能有相同的; 2. 参考 1. leetcode_15. 3Sum; 2. Grandyang; 完 阅读全文

posted @ 2020-10-27 23:05 鹅要长大 阅读(107) 评论(0) 推荐(0) 编辑

【leetcode_medium】31. Next Permutation
摘要:leetcode_medium_array problem 31. Next Permutation solution #1: According to Wikipedia, a man named Narayana Pandita presented the following simple al 阅读全文

posted @ 2020-10-27 22:59 鹅要长大 阅读(117) 评论(0) 推荐(0) 编辑

【leetcode_easy】1460. Make Two Arrays Equal by Reversing Sub-arrays
摘要:leetcode_easy_array problem 1460. Make Two Arrays Equal by Reversing Sub-arrays solution #1: code: 参考 1. leetcode_1460. Make Two Arrays Equal by Rever 阅读全文

posted @ 2020-10-27 22:58 鹅要长大 阅读(74) 评论(0) 推荐(0) 编辑

【leetcode_easy】1502. Can Make Arithmetic Progression From Sequence
摘要:leetcode_easy_array 1502. Can Make Arithmetic Progression From Sequence solution #1: code 参考 1. leetcode_1502. Can Make Arithmetic Progression From Se 阅读全文

posted @ 2020-10-27 22:52 鹅要长大 阅读(51) 评论(0) 推荐(0) 编辑

【leetcode_easy】1588. Sum of All Odd Length Subarrays
摘要:1588. Sum of All Odd Length Subarrays solution#1: Brute Search; code solution#2: 元素求和; code solution#3: 找规律; code: 参考 1. leetcode_easy_array_1588. Sum 阅读全文

posted @ 2020-10-27 22:48 鹅要长大 阅读(91) 评论(0) 推荐(0) 编辑

【linux基础err】ubuntu16.04 dns_probe_finished_no_internet
摘要:err: ubuntu16.04 dns_probe_finished_no_internet 有线和无线的图标正常,不能连接上网,与DNS的配置有关。 阅读全文

posted @ 2020-10-27 22:42 鹅要长大 阅读(891) 评论(0) 推荐(0) 编辑

【leetcode_medium】33. Search in Rotated Sorted Array
摘要:leetcode_medium_array problem 33. Search in Rotated Sorted Array solution #1: 解题思路: 先使用二分法找出最小的元素,然后确定哪一边进行搜索,最后使用二分法搜索; code: 注意: 1. 二分法的思路和code必须熟练掌 阅读全文

posted @ 2020-10-22 19:57 鹅要长大 阅读(62) 评论(0) 推荐(0) 编辑

【leetcode_medium】34. Find First and Last Position of Element in Sorted Array
摘要:leetcode_medium_array problem 34. Find First and Last Position of Element in Sorted Array solution #1: 解题思路:分别使用二分法查找最左和最右端的元素; code 注意,最右端元素的mid值如何确定 阅读全文

posted @ 2020-10-22 19:56 鹅要长大 阅读(44) 评论(0) 推荐(0) 编辑

【leetcode_medium】39. Combination Sum
摘要:leetcode_medium_array problem 39. Combination Sum 看过别人的解法还是没有完全明白。。。 solution #1: 使用递归函数; code: solution #2: 数组排序后使用递归函数; code 注意: 1. 参考 1. leetcode_3 阅读全文

posted @ 2020-10-22 19:55 鹅要长大 阅读(96) 评论(0) 推荐(0) 编辑

【leetcode_medium】40. Combination Sum II
摘要:leetcode_medium_array problem 40. Combination Sum II solution #1: DFS; code: 注意: 1. 数组元素不能重复; 2. 在递归中也要注意数组元素不能重复; 参考 1. leetcode_40. Combination Sum 阅读全文

posted @ 2020-10-22 19:52 鹅要长大 阅读(52) 评论(0) 推荐(0) 编辑

【leetcode_medium】55. Jump Game
摘要:leetcode_medium_array problem 55. Jump Game solution #1:动态规划; code: solution #2: 贪心算法; code: 注意: 1. 需要理解题意,能否到达最后,而不是必须到达最后位置; 2. 深入理解掌握动态规划算法; 3. 深入理 阅读全文

posted @ 2020-10-20 22:56 鹅要长大 阅读(83) 评论(0) 推荐(0) 编辑

【leetcode_medium】48. Rotate Image
摘要:leetcode_medium_array problem 48. Rotate Image solution #1: 循环更新; code solution #2:先转置再每行以中间列为轴翻转; code: solution #3: code 参考 1. leetcode_48. Rotate I 阅读全文

posted @ 2020-10-20 22:55 鹅要长大 阅读(66) 评论(0) 推荐(0) 编辑

【leetcode_medium】59. Spiral Matrix II
摘要:leetcode_medium_array problem 59. Spiral Matrix II 参考 1. leetcode_59. Spiral Matrix II; 完 阅读全文

posted @ 2020-10-20 22:53 鹅要长大 阅读(70) 评论(0) 推荐(0) 编辑

【leetcode_medium】56. Merge Intervals
摘要:leetcode_medium_array problem 56. Merge Intervals solution #1: 先排序再合并; code solution #2: code: 注意: 1. 二维数组如何进行排序; 2. 合并的规则; 参考 1. leetcode_56. Merge I 阅读全文

posted @ 2020-10-20 22:50 鹅要长大 阅读(98) 评论(0) 推荐(0) 编辑

【leetcode_medium】64. Minimum Path Sum
摘要:leetcode_medium_array problem 64. Minimum Path Sum solution #1: 动态规划; code solution #2: 提前赋值; code: solution #3: 优化-使用一维数组存储; code solution #4: 优化-使用原 阅读全文

posted @ 2020-10-19 22:50 鹅要长大 阅读(88) 评论(0) 推荐(0) 编辑

【leetcode_medium】62. Unique Paths
摘要:leetcode_medium_array problem 62. Unique Paths solution #1: code 参考 1. leetcode_62. Unique Paths; 完 阅读全文

posted @ 2020-10-19 22:48 鹅要长大 阅读(82) 评论(0) 推荐(0) 编辑

【leetcode_medium】63. Unique Paths II
摘要:leetcode_medium_array problem 63. Unique Paths II solution #1: 动态规划二维数组; code solution #2: 动态规划一维数组; code: 参考 1. leetcode_63. Unique Paths II; 完 阅读全文

posted @ 2020-10-19 22:44 鹅要长大 阅读(87) 评论(0) 推荐(0) 编辑

【leetcode_medium】73. Set Matrix Zeroes
摘要:leetcode_medium_array problem 73. Set Matrix Zeroes solution #1: 空间复杂度O(m*n); code solution #2: 空间复杂度O(m+n); 解题思路:记录含有零值的行和列,然后进行数值变换; code solution # 阅读全文

posted @ 2020-10-19 22:42 鹅要长大 阅读(55) 评论(0) 推荐(0) 编辑

【leetcode_medium】74. Search a 2D Matrix
摘要:leetcode_medium_array problem 74. Search a 2D Matrix 理解题意:在递增数组中查询是否存在某个数值; solution #1: 双重循环; code solution #2: 解题思路:每行判断target数值是否在其中,然后再在所在行查询; cod 阅读全文

posted @ 2020-10-19 22:40 鹅要长大 阅读(81) 评论(0) 推荐(0) 编辑

【leetcode_medium】240. Search a 2D Matrix II
摘要:leetcode_medium_array problem 240. Search a 2D Matrix II 理解题意:总结数组元素的规律,任意矩形区域,左上最小,右下最大。 solution #1:以左下作为参考点,向上数值减小,向右数值增大; 解题思路: 和目标数相比较,如果目标数大,就往右 阅读全文

posted @ 2020-10-19 22:38 鹅要长大 阅读(59) 评论(0) 推荐(0) 编辑

【leetcode_medium】75. Sort Colors
摘要:leetcode_medium_array problem 75. Sort Colors 理解题意:本质上还是排序题。 solution #1: code 参考 1. leetcode_75. Sort Colors; 完 阅读全文

posted @ 2020-10-19 22:36 鹅要长大 阅读(89) 评论(0) 推荐(0) 编辑

【leetcode_medium】78. Subsets
摘要:leetcode_medium_array problem 78. Subsets solution #1: code solution #2: 递归; 没看明白这种方法; code 参考 1. leetcode_78. Subsets; 完 阅读全文

posted @ 2020-10-19 22:29 鹅要长大 阅读(79) 评论(0) 推荐(0) 编辑

【opencv基础】随机颜色生成
摘要:code // show contour points. cv::Scalar color(rand()&255, rand()&255, rand()&255); // cv::Mat showimg1 = cv::Mat::zeros(cv::Size(out_w_, out_h_), CV_8 阅读全文

posted @ 2020-10-19 22:26 鹅要长大 阅读(992) 评论(0) 推荐(0) 编辑

【leetcode_easy_array】1566. Detect Pattern of Length M Repeated K or More Times
摘要:problem 1566. Detect Pattern of Length M Repeated K or More Times solution#1: brute search; hint: Use a three-layer loop to check all possible pattern 阅读全文

posted @ 2020-10-19 22:10 鹅要长大 阅读(124) 评论(0) 推荐(0) 编辑

【leetcode_easy_array】1572. Matrix Diagonal Sum
摘要:problem 1572. Matrix Diagonal Sum hint There will be overlap of elements in the primary and secondary diagonals if and only if the length of the matri 阅读全文

posted @ 2020-10-19 22:06 鹅要长大 阅读(158) 评论(0) 推荐(0) 编辑

【CANoe基础】CANoe常用操作
摘要:前言 注意,CANoe软件network的CAN通道和硬件是CAN通道是一一对应的。 下午使用CANoe回灌数据的时候,trace没有数据流动,但是offline模式正常,后发现是软硬件连接不正常。 注意,有时候数据没有反应,可能是硬件连接失效,也就是可能CANoe的驱动虽在,但是软硬件没有正常连接 阅读全文

posted @ 2020-10-19 22:05 鹅要长大 阅读(17083) 评论(0) 推荐(0) 编辑

导航

< 2025年2月 >
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 1
2 3 4 5 6 7 8

统计

点击右上角即可分享
微信分享提示