老司机带你刷 LeetCode

我如今是一名Android Developer,大学的我曾是一名ACMer,我一直认为数据结构和算法是作为一名程序员必须掌握和善于利用的,为了不让数据结构和算法淡出我的记忆,所以我打算重拾LeetCode之Algorithm,语言选择的是Java,题库会一点点完善起来,按简单,中等,困难分类,相应难度下按题号排序,源代码在src目录中,相关解题都在 note目录中,想要学习数据结构和算法或打算刷LeetCode的小伙伴们欢迎star哦。

如今有机会面试Facebook,附上LeetCode上Facebook的面试题目序号,希望可以帮助到以后想入Facebook的小伙伴:-)

1,10,13,15,17,20,23,25,26,28,33,38,43,44,49,50,56,57,67,68,69,71,75,76 78,79,80,85,88,90,91,98,102,117,121,125,127,128,133,139,146,157,158,161 168,173,200,206,208,209,210,211,215,218,221,234,235,236,238,252,253,257 261,265,269,273,274,275,277,278,282,283,285,286,297,301,311,314,325,334 341,377,380,398,404,410,461,477,494,523,525,534,535,543,554 

如果想知道更多公司LeetCode面试题,可以参看Companies.md

附上镇楼诗:

明有科举八股,今有LeetCode。
八股定格式而取文采心意,LeetCode定题目且重答案背诵。
美其名曰:”practice makes perfect.”
为何今不如古?
非也非也,
科举为国取士,LeetCode为Google筛码工,各取所需也。

Easy

#TitleTag
1Two SumArray, Hash Table
7Reverse IntegerMath
9Palindrome NumberMath
13Roman to IntegerMath, String
14Longest Common PrefixString
20Valid ParenthesesStack, String
21Merge Two Sorted ListsLinked List
26Remove Duplicates from Sorted ArrayArray, Two Pointers
27Remove ElementArray, Two Pointers
28Implement strStr()Two Pointers, String
35Search Insert PositionString
38Count and SayString
53Maximum SubarrayArray, Dynamic Programming, Divide and Conquer
58Length of Last WordString
66Plus OneArray, Math
67Add BinaryMath, String
69Sqrt(x)Binary Search, Math
70Climbing StairsDynamic Programming
83Remove Duplicates from Sorted ListLinked List
88Merge Sorted ArrayArray, Two Pointers
100Same TreeTree, Depth-first Search
101Symmetric TreeTree, Depth-first Search, Breadth-first Search
104Maximum Depth of Binary TreeTree, Depth-first Search
107Binary Tree Level Order Traversal IITree, Breadth-first Search
108Convert Sorted Array to Binary Search TreeTree, Depth-first Search
110Balanced Binary TreeTree, Depth-first Search
111Minimum Depth of Binary TreeTree, Depth-first Search, Breadth-first Search
112Path SumTree, Depth-first Search
118Pascal’s TriangleArray
119Pascal’s Triangle IIArray
121Best Time to Buy and Sell StockArray, Dynamic Programmin
122Best Time to Buy and Sell Stock IIArray, Greedy
543Diameter of Binary TreeTree

Medium

#TitleTag
2Add Two NumbersLinked List, Math
3Longest Substring Without Repeating CharactersHash Table, Two Pointers, String
5Longest Palindromic SubstringString
8String to Integer (atoi)Math, String
153SumArray, Two Pointers
17Letter Combinations of a Phone NumberString, Backtracking
19Remove Nth Node From End of ListLinked List, Two Pointers
33Search in Rotated Sorted ArrayArrays, Binary Search
43Multiply StringsMath, String
49Group AnagramsHash Table, String
50Pow(x, n)Math, Binary Search
56Merge IntervalsArray, Sort
554Brick WallHash Table

Hard

#TitleTag
4Median of Two Sorted ArraysArray, Binary Search, Divide and Conquer
10Regular Expression MatchingString, Dynamic Programming, Backtracking
23Merge k Sorted ListsLinked List, Divide and Conquer, Heap
25Reverse Nodes in k-GroupLinked List
44Reverse Nodes in k-GroupString, Dynamic Programming, Backtracking, Greedy
57Insert IntervalArray, Sort
68Text JustificationString
    原文作者:算法小白
    原文地址: https://juejin.im/entry/5a27a6c751882531b15b5e23
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞