- 博客(4)
- 收藏
- 关注
原创 3Sum
Leetcode笔记 3SumGiven an array nums of n integers, are there elements a, b, c in nums such that a + b+ c = 0? Find all unique triplets in the array which gives the sum of zero.Note:The solution set...
2019-08-07 17:26:44
68
原创 Container With Most Water
Container With Most Water问题描述Given n non-negative integersa1,a2,…,ana_1,a_2,…,a_na1,a2,…,an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two end...
2019-07-23 16:34:04
87
原创 Median of Two Sorted Arrays
Median of Two Sorted Arrays问题描述解题思路思路一 :merge+sortpython3代码思路二:第k最小值C++JAVA思路三:二分查找C++问题描述There are two sorted arrays nums1 and nums2 of size m and n respectively.Find the median of the two sorted ...
2019-07-23 12:53:47
189
原创 Two Sum
LeetCode SUMTwo Sum 学习笔记问题描述C++版本unordered_mapSTL vector构造函数增加函数删除元素遍历函数大小函数其它函数STL Map声明插入取值容量查询迭代器删除交换顺序比较查找简单方法JAVA代码构造函数存储读取删除遍历**判断key或value是否存在**替换简单方法Python3版本Python3代码Two Sum 学习笔记问题描述Given ...
2019-06-04 16:32:44
523
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人