码迷,mamicode.com
首页 > 其他好文 > 详细

[LeetCode] 系统刷题9_Backtracking

时间:2021-06-13 09:48:38      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:quick   window   todo   air   dia   plus one   serialize   ogr   机器   

有待总结。

 

Binary Search:

633, Sum of Square Numbers

475, Heaters

744, Find Smallest Letter Greater than target(LC submissions from original session)

427???? Construct Quad Tree(????真的是binary search吗)

 

Shortest:

243, Shortest Word Distance (all questions, classify)

821, shortest Distance to a character(all questions, classify)

 

 

Substrings:

438, Find all anagrams in a string(find template from the disscution in LC, also in all questions, classify)

  76, Minimum window substring

  3, Longest substring without repeating characters

  30, Substring with Concatenation of All Words 

  159, Longest substring with at most two distinct  characters

340, Longest substring with at most k distinct  characters

395, Longest Substring with At Least K Repeating Characters

459, Repeated Substring Pattern

467, Unique Substrings in Wraparound String

643????Maximum Average Subarray I(Is it substring?????)

647, Maximum Average Subarray I

696, Count Binary Substrings

5. Longest Palindromic Substring

 

Heap:

703, kth largest element in a stream

347, Top K Frequent Elements(paper, has also sort solution. )

 

Tries(Prefix trees): Maybe look at red-black tree and AVL trees?

implement tries data structure

add scarch word

word search II

642, Design Search Autocomplete System

 

Union find(Disjoint set union) => key: graph, union

connect graph

number of island I, II

685, Redundant Connection II(LC submissions from original session) - > take a look at 684 too, even though maybe not union find anymore. 

 

Dynamic Programming

121, 122, 198(House Robber), 221(Maximal Square), 329(Longest Increasing Path), Lintcode394, 395, 396(Coins in a line I, II, III), 312(burst ballons) they are in all questions, need to copy them into Dynamic Programming.

213 House Robber II

337,  House Robber III

LC 85 Maximal Rectangle

 

 

 

 

 

Math: minimal distance (BFS)

453, Minimum Moves to Equal Array Elements

462, Minimum Moves to Equal Array Elements II

296, Best meeting points

317, Shortest Distance from All Buildings 

663,  Equal tree partition(DFS, or divide and conquer) Find solution in the paper.  TODO today!

 

 

 

Google 面经:

289, Game of life(Paper)

766, Toeplitz Matrix(Paper)

 54, Spiral Matrix(Paper)

59, Spiral Matrix II(Paper)

259, 3Sum Smaller(paper)

382, Linked List Random Node(paper)

369, Plus one linked LIst(paper)

379, Design Phone Directory(Paper)

23, Merge K sorted Lists(Paper, add brute force solution. )

270, Closest BST value(paper)

250, Count Univalue Subtrees(paper, with solution)

536, Construct BT from String(paper, with solution)

652, Find Duplicate Subtrees(paper)

298, Binary Tree Longest Consecutive sequence (already have it, need to compare with the solution in the paper.)

543, Diameter of Binary Tree(Paper, has solution, also LC submissions)

681, Next closest time(Paper, has solution)

683, K Empty Slots

121, 122(Already have it), should look all the buy and seel stocks.(123, 188, 309, 714)

463, Island Perimeter(DFS, 矩阵边)

49, Group Anagrams (LC submissions)

249, Group Shifted Strings

136, Single Number

399, Evaluate Division(高频题)

246, Strobogrammatic Number 

247, Strobogrammatic Number II 

394, Decode String

25, reverse nodes in k-group(LC submissions)

777, Swap Adjacent in LR String(LC submissions from original session)

205, Isomorphic String (LC submissions from original session) HashTable

282, Expression Add Operators.

800, SImilar RGB Color

373, Find K pairs with Smallest sums((LC submissions from original session)) stack [["", 1]]

734, Sentence Similarity((LC submissions from original session)) HashTable

737, Sentence Similarity II ((LC submissions from original session))

249, Goup Shifted Strings(LC submissions from original session) Hash Table

332, Reconstruct Itinerary(LC submissions from original session)

163, Missing Ranges(LC submissions from original session)

299, Bulls and cows(LC submissions from original session) Hash

582, Kill process(LC submissions from original session) 

38, count and say(already in all questions, but need to classify)

50, pow(x, n) (LC submissions from original session)

56, merge intervals(LC submissions)

57, insert intervals

66, plus one(LC submissions from original session)

91, Decode Ways

169, Majority element(LC submissions from original session)

213 House Robber II

214, Shortest Palindrome

219, Contains Duplicate II(LC submissions from original session) Hash

279, Perfect Squares

300, longest increasing subsequence

305, Number of islands II(LC submissions from original session)

308, Range Sum Query 2D - Mutable(LC submissions from original session)

315, Count of Smaller Numbers After self

343, Integer Break

362, Design Hit Counter

403, Frog Jump

411, Minimum Unique Word Abbreviation

540, Single Element in a sorted Array

568, Maximum Vacation Days

604, Design Compressed String Iterator

616, Add Bold tag in String(LC submissions from original session)

770, Basic Calculator IV (Hash)

818, Race Car

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

unknown number of LC

生成矩阵内随机点

tree, maximum length from leaf to leaf.

背包package

rand(), return (0,1) 的随机数, int myRand(int x, int y), return [x, y] 之间的随机整数

线段树

扫地机器人

 

 

 

 

Longest substring

  3. Longest Substring without repeating charaters. (Paper, has solution, also LC submissions)

  340. Longest Substring with at most k distincet characters, (paper, has solution)

  159, Longest Substring with at most two distinct characters. (paper, has solution)

  395, Longest substring with at least k repeating characters.(paper, has solution.)

 

Design:

  173, BST Iterator, already have it, need to compare with the solution in the paper.

  297, Serialize and deserialize Binary Tree (Paper, has solution, also LC submissions)

  535, Encode and decode TinyURL(papar, has solution)

        Design parking lot

 

 

Sort:

understand bubble sort, selection sort(n^2)

be able to write code for merge sort(n lgn), maybe quick sort too. 

 

topological sort:

 

Real math problems and bit manipulation:

 

[LeetCode] 系统刷题9_Backtracking

标签:quick   window   todo   air   dia   plus one   serialize   ogr   机器   

原文地址:https://www.cnblogs.com/Johnsonxiong/p/14839208.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!