Catalogue of leetcode

I. Array and List

------I/1.Sort------

Merge Sorted Array

Sort Colors

Merge Two Sorted Lists

Merge k Sorted Lists

Longest Consecutive Sequence

Insertion Sort List

Sort List

------I/2.Adjust List------

Partition List

Reverse Linked List II

Rotate List

Reverse Nodes in k-Group

Swap Nodes in Pairs

Reorder List 

Remove Element

Remove Duplicates from Sorted Array

Remove Duplicates from Sorted Array II

Remove Duplicates from Sorted List

Remove Duplicates from Sorted List II

------I/3.1Search(sorted: 二分法)------

Search Insert Position

Search for a Range

Convert Sorted List to Binary Search Tree

Convert Sorted Array to Binary Search Tree

Sqrt(x) 

Median of Two Sorted Arrays

------I/3.2Search(unsorted)------

Candy

发帖水王 <编程之美>P130

------I/4.Two Pointers------

Valid Palindrome

Remove Nth Node From End of List

Linked List Cycle

Linked List Cycle II 

------I/5.双向链表------

LRU Cache

------I/6.Shift------

通过逆序移位 <编程之美> P201

字符串通过连接来代替移位 P103


II. Queue &Stack

-----II/1.Queue-----

三个队列排序p195

实现带最大值查询的队列<编程之美> P239

-----II/2.Stack-----

Flatten Binary Tree to Linked List

Binary Tree Preorder Traversal

Binary Tree Postorder Traversal

Simplify Path

Valid Parentheses

Longest Valid Parentheses

Evaluate Reverse Polish Notation

Implementation Stack by Array  p111

stack的实现(含min方法)p113

Hanoi p118


III. Tree

-----III/1.“递归”实现前序、中序、后序遍历------

Path Sum

Path Sum II

Sum Root to Leaf Numbers

Recover Binary Search Tree

Binary Tree Maximum Path Sum

Minimum Depth of Binary Tree

Maximum Depth of Binary Tree

Balanced Binary Tree

Unique Binary Search Trees

Unique Binary Search Trees II

Symmetric Tree

Construct Binary Tree from Preorder and Inorder Traversal

Construct Binary Tree from Inorder and Postorder Traversal

------III/2.“循环+栈”实现前序、中序、后序------

Flatten Binary Tree to Linked List(III)

-----III/3.level search(wfs)-----

Binary Tree Level Order Traversal II

Populating Next Right Pointers in Each Node

Populating Next Right Pointers in Each Node II

Word Ladder(set的使用)


IV. Graph

注意:对于不能重复遍历的情况,需要为每个节点标记是否已访问过

------IV/1.遍历所有节点,两个for循环------

Pascal's Triangle

Pascal's Triangle II

Rotate Image

Search a 2D Matrix

------IV/2.设定遍历方向,按照该方向遍历------

Spiral Matrix

Spiral Matrix II

Zigzag Conversion

------IV/3.DFS------

Word Search

Set Matrix Zeroes

Clone Graph

Copy List with Random Pointer

Surrounded Regions

------IV/4.WFS------

Word Ladder II(unordered_map,map,set的使用

最短路径 <编程之美>P90

------IV/5.Dynamic Programming------

Minimum Path Sum

Unique Path 

Unique Path II

------IV/6.数据结构------

bfs在大数据时通过hash表代替node marking p199

稀疏矩阵的表示方法(链表、数组、三元组) <珠玑>p97p209

------IV/7.着色问题------

点图&区间图 <编程之美> P58-60


V. Hash table, map

Minimum Window Substring(map的遍历)

Anagrams

Substring with Concatenation of All Words

First Missing Positive

 

VI. recursion/ backtracking

Palindrome partitioning

Subsets

Subsets II

Combinations

Permutations

Permutations II

Next Permutation

Combination Sum

Combination Sum II

Letter Combinations of a Phone Number (string的删除)

4 Sum

3 Sum

3 Sum Closest

Two Sum

Generate Parentheses

Restore IP Addresses

Wildcard Matching

Regular Expression Matching(正则表达式)

N-Queens

N-Queens II

Sudoku Solver

Valid Sudoku(vector的assign函数)

***vector与string的拷贝

vector  vcBuf;

string stBuf("Hello DaMao!!!");

vcBuf.resize(stBuf.size());
vcBuf.assign(stBuf.begin(), stBuf.end());


VII. Dynamique programming

Maximum Subarray

Longest Substring Without Repeating Characters

Longest Common Prefix

Longest Palindromic Substring

Container With Most Water

Gas Station

Maximal Rectangle

Largest Rectangle in Histogram

Trapping Rain Water

Permutation Sequence(int->string转换)

Count and Say

Best Time to Buy and Sell Stock III

Best Time to Buy and Sell Stock

Best Time to Buy and Sell Stock II

Climbing Stairs

Jump Game II

Decode Ways

Palindrome partitioning II

Palindrome partitioning(VII)

Triangle

<编程之美> P44,191-193

Word Break

Word Break II

Interleaving String

Edit Distance

Distinct Subsequences

Scramble String 


VIII.Greedy

Jump game

Max Points on a Line


IX.Divide and Conquer

Pow(x,n)

Divide Two Integers


X. Numerique analysis

Valid Number

Plus One

Add Two Numbers

Add Binary

Multiply Strings(vector转成string

Roman to Integer

Integer to Roman

String to Integer(atoi)

Reverse Integer

Palindrome Number


XI. Project

Insert Interval

Merge Intervals

<编程之美>P50-51


XII. 查找

------字符串匹配-------

Implement strStr()



XIII. Bit Operation

Gray Code

Single Number

Single Number II

p95,p140, p141,p172

Permutations p173

Parenthesis p174

pennies p176

Queen 177


XIV. optimization<珠玑>

malloc的优化 <珠玑>p92

string连接的优化 p100

数据压缩 <珠玑>p100-101

哨兵(一元数组、链表、箱、BST)<珠玑>p137

随机数 <珠玑>p120(减少生成次数P125/9 未知np125/10)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值