![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCode学习笔记
枕头酱
自我学习
展开
-
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 · 852 阅读 · 0 评论 -
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 · 89 阅读 · 0 评论 -
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 · 261 阅读 · 0 评论 -
3Sum
Leetcode笔记 3Sum Given 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 · 70 阅读 · 0 评论