Awesome
awesome-java-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
# | Title | Tag |
---|---|---|
1 | Two Sum | Array, Hash Table |
7 | Reverse Integer | Math |
9 | Palindrome Number | Math |
13 | Roman to Integer | Math, String |
14 | Longest Common Prefix | String |
16.11 | 跳水板(Diving Board LCCI) | 递归、记忆化 |
20 | Valid Parentheses | Stack, String |
21 | Merge Two Sorted Lists | Linked List |
26 | Remove Duplicates from Sorted Array | Array, Two Pointers |
27 | Remove Element | Array, Two Pointers |
28 | Implement strStr() | Two Pointers, String |
35 | Search Insert Position | String |
38 | Count and Say | String |
53 | Maximum Subarray | Array, Divide and Conquer, Dynamic Programming |
58 | Length of Last Word | String |
66 | Plus One | Array, Math |
67 | Add Binary | Math, String |
69 | Sqrt(x) | Binary Search, Math |
70 | Climbing Stairs | Dynamic Programming |
83 | Remove Duplicates from Sorted List | Linked List |
88 | Merge Sorted Array | Array, Two Pointers |
100 | Same Tree | Tree, Depth-first Search |
101 | Symmetric Tree | Tree, Depth-first Search, Breadth-first Search |
104 | Maximum Depth of Binary Tree | Tree, Depth-first Search |
107 | [Binary Tree Level Order Traversal II][107] | Tree, Breadth-first Search |
108 | Convert Sorted Array to Binary Search Tree | Tree, Depth-first Search |
110 | Balanced Binary Tree | Tree, Depth-first Search |
111 | Minimum Depth of Binary Tree | Tree, Depth-first Search, Breadth-first Search |
112 | Path Sum | Tree, Depth-first Search |
118 | Pascal's Triangle | Array |
119 | Pascal's Triangle II | Array |
121 | Best Time to Buy and Sell Stock | Array, Dynamic Programmin |
122 | Best Time to Buy and Sell Stock II | Array, Greedy |
543 | Diameter of Binary Tree | Tree |
Medium
Hard
# | Title | Tag |
---|---|---|
4 | Median of Two Sorted Arrays | Array, Binary Search, Divide and Conquer |
10 | Regular Expression Matching | String, Dynamic Programming, Backtracking |
23 | Merge k Sorted Lists | Linked List, Divide and Conquer, Heap |
25 | Reverse Nodes in k-Group | Linked List |
30 | Substring with Concatenation of All Words | Hash Table, Two Pointers, String |
44 | Wildcard Matching | String, Dynamic Programming, Backtracking, Greedy |
57 | Insert Interval | Array, Sort |
68 | Text Justification | String |
1028 | 从先序遍历还原二叉树(Recover a Tree From Preorder Traversal) | 树、深度优先搜索 |
打个小广告
欢迎加入我的小专栏「基你太美」一起学习。