LeetCode笔记
Chen-Sh
好记性不如烂笔头
展开
-
LeetCode 数组(二)
35.Search Insert PositionGiven a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume n...原创 2019-03-29 22:17:18 · 135 阅读 · 0 评论 -
LeetCode 字符串(一)
6.ZigZag ConversionThe string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)P ...原创 2019-03-30 11:05:02 · 439 阅读 · 0 评论 -
unordered_map 笔记
目录1.使用注意事项:2.定义3.操作1.使用注意事项:C++11标准之前使用unordered_map, 需要加#include<tr1/unordered_map>using namespace std::tr1;2.定义template<class Key, class Ty, class Hash = std...原创 2019-04-01 15:03:02 · 1850 阅读 · 0 评论 -
LeetCode 数组(一)
目录1.Two Sum4.Median of Two Sorted Arrays11.Container With Most Water15.3Sum16.3Sum Closest18.4Sum26.Remove Duplicates from Sorted Array27.Remove Element33.Search in Rotat...原创 2019-03-28 10:33:28 · 603 阅读 · 0 评论 -
LeetCode 数学
7.Reverse IntegerGiven a 32-bit signed integer, reverse digits of an integer.Example 1:Input: 123Output: 321Example 2:Input: -123Output: -321Example 3:Input: 120Output: 21Note:Assume ...原创 2019-04-02 09:49:59 · 160 阅读 · 0 评论