📣 黑五价提前开抢|VIP一年通行证5折,蓝莓、Offer多多同步特惠
查看: 246| 回复: 1
跳转到指定楼层
上一主题 下一主题
收起左侧

[Leetcode] 【干货】Leetcode最常见200道面试题

全局:

注册一亩三分地论坛,查看更多干货!

您需要 登录 才可以下载或查看附件。没有帐号?注册账号

x
难度标记:🟢 Easy、🟡 Medium、🔴 Hard。

Array & Hashing(15题)

1 1 Two Sum 🟢 2 49 Group Anagrams 🟡 3 128 Longest Consecutive Sequence 🟡 4 217 Contains Duplicate 🟢 5 242 Valid Anagram 🟢 6 238 Product of Array Except Self 🟡 7 347 Top K Frequent Elements 🟡 8 36 Valid Sudoku 🟡 9 41 First Missing Positive 🔴 10 560 Subarray Sum Equals K 🟡 11 525 Contiguous Array 🟡 12 169 Majority Element 🟢 13 229 Majority Element II 🟡 14 442 Find All Duplicates in an Array 🟡 15 448 Find All Numbers Disappeared in an Array 🟢

Two Pointers(12题)

16 125 Valid Palindrome 🟢 17 167 Two Sum II - Input Array Is Sorted 🟡 18 15 3Sum 🟡 19 11 Container With Most Water 🟡 20 42 Trapping Rain Water 🔴 21 26 Remove Duplicates from Sorted Array 🟢 22 27 Remove Element 🟢 23 75 Sort Colors 🟡 24 283 Move Zeroes 🟢 25 977 Squares of a Sorted Array 🟢 26 18 4Sum 🟡 27 844 Backspace String Compare 🟢

Sliding Window(12题)

28 3 Longest Substring Without Repeating Characters 🟡 29 424 Longest Repeating Character Replacement 🟡 30 76 Minimum Window Substring 🔴 31 567 Permutation in String 🟡 32 438 Find All Anagrams in a String 🟡 33 209 Minimum Size Subarray Sum 🟡 34 239 Sliding Window Maximum 🔴 35 1004 Max Consecutive Ones III 🟡 36 904 Fruit Into Baskets 🟡 37 643 Maximum Average Subarray I 🟢 38 1456 Maximum Number of Vowels in a Substring of Given Length 🟡 39 713 Subarray Product Less Than K 🟡

Stack & Monotonic Stack(10题)

40 20 Valid Parentheses 🟢 41 155 Min Stack 🟡 42 150 Evaluate Reverse Polish Notation 🟡 43 739 Daily Temperatures 🟡 44 853 Car Fleet 🟡 45 84 Largest Rectangle in Histogram 🔴 46 496 Next Greater Element I 🟢 47 503 Next Greater Element II 🟡 48 394 Decode String 🟡 49 224 Basic Calculator 🔴

Binary Search(10题)

50 704 Binary Search 🟢 51 35 Search Insert Position 🟢 52 33 Search in Rotated Sorted Array 🟡 53 153 Find Minimum in Rotated Sorted Array 🟡 54 74 Search a 2D Matrix 🟡 55 875 Koko Eating Bananas 🟡 56 981 Time Based Key-Value Store 🟡 57 4 Median of Two Sorted Arrays 🔴 58 34 Find First and Last Position of Element in Sorted Array 🟡 59 162 Find Peak Element 🟡

Linked List(10题)

60 206 Reverse Linked List 🟢 61 21 Merge Two Sorted Lists 🟢 62 141 Linked List Cycle 🟢 63 142 Linked List Cycle II 🟡 64 19 Remove Nth Node From End of List 🟡 65 143 Reorder List 🟡 66 2 Add Two Numbers 🟡 67 138 Copy List with Random Pointer 🟡 68 23 Merge k Sorted Lists 🔴 69 146 LRU Cache 🟡

Binary Tree(20题)

70 226 Invert Binary Tree 🟢 71 104 Maximum Depth of Binary Tree 🟢 72 543 Diameter of Binary Tree 🟢 73 110 Balanced Binary Tree 🟢 74 100 Same Tree 🟢 75 572 Subtree of Another Tree 🟢 76 102 Binary Tree Level Order Traversal 🟡 77 199 Binary Tree Right Side View 🟡 78 98 Validate Binary Search Tree 🟡 79 230 Kth Smallest Element in a BST 🟡 80 235 Lowest Common Ancestor of a BST 🟡 81 236 Lowest Common Ancestor of a Binary Tree 🟡 82 105 Construct Binary Tree from Preorder and Inorder Traversal 🟡 83 124 Binary Tree Maximum Path Sum 🔴 84 297 Serialize and Deserialize Binary Tree 🔴 85 114 Flatten Binary Tree to Linked List 🟡 86 112 Path Sum 🟢 87 113 Path Sum II 🟡 88 1448 Count Good Nodes in Binary Tree 🟡 89 863 All Nodes Distance K in Binary Tree 🟡

Heap & Priority Queue(10题)

90 215 Kth Largest Element in an Array 🟡 91 973 K Closest Points to Origin 🟡 92 703 Kth Largest Element in a Stream 🟢 93 295 Find Median from Data Stream 🔴 94 621 Task Scheduler 🟡 95 1046 Last Stone Weight 🟢 96 767 Reorganize String 🟡 97 355 Design Twitter 🟡 98 692 Top K Frequent Words 🟡 99 1834 Single-Threaded CPU 🟡

Backtracking(12题)

100 78 Subsets 🟡 101 90 Subsets II 🟡 102 46 Permutations 🟡 103 47 Permutations II 🟡 104 39 Combination Sum 🟡 105 40 Combination Sum II 🟡 106 77 Combinations 🟡 107 79 Word Search 🟡 108 131 Palindrome Partitioning 🟡 109 17 Letter Combinations of a Phone Number 🟡 110 51 N-Queens 🔴 111 212 Word Search II 🔴

Trie(8题)

112 208 Implement Trie (Prefix Tree) 🟡 113 211 Design Add and Search Words Data Structure 🟡 114 648 Replace Words 🟡 115 677 Map Sum Pairs 🟡 116 1268 Search Suggestions System 🟡 117 421 Maximum XOR of Two Numbers in an Array 🟡 118 472 Concatenated Words 🔴 119 745 Prefix and Suffix Search 🔴

Graph & BFS/DFS(15题)

120 200 Number of Islands 🟡 121 133 Clone Graph 🟡 122 695 Max Area of Island 🟡 123 994 Rotting Oranges 🟡 124 417 Pacific Atlantic Water Flow 🟡 125 130 Surrounded Regions 🟡 126 542 01 Matrix 🟡 127 1091 Shortest Path in Binary Matrix 🟡 128 127 Word Ladder 🔴 129 752 Open the Lock 🟡 130 785 Is Graph Bipartite? 🟡 131 886 Possible Bipartition 🟡 132 399 Evaluate Division 🟡 133 743 Network Delay Time 🟡 134 787 Cheapest Flights Within K Stops 🟡

Topological Sort & Union Find(8题)

135 207 Course Schedule 🟡 136 210 Course Schedule II 🟡 137 269 Alien Dictionary 🔴 138 310 Minimum Height Trees 🟡 139 323 Number of Connected Components in an Undirected Graph 🟡 140 684 Redundant Connection 🟡 141 721 Accounts Merge 🟡 142 547 Number of Provinces 🟡

Greedy & Intervals(12题)

143 121 Best Time to Buy and Sell Stock 🟢 144 55 Jump Game 🟡 145 45 Jump Game II 🟡 146 134 Gas Station 🟡 147 56 Merge Intervals 🟡 148 57 Insert Interval 🟡 149 435 Non-overlapping Intervals 🟡 150 452 Minimum Number of Arrows to Burst Balloons 🟡 151 253 Meeting Rooms II 🟡 152 122 Best Time to Buy and Sell Stock II 🟡 153 763 Partition Labels 🟡 154 406 Queue Reconstruction by Height 🟡

Dynamic Programming(25题)

155 70 Climbing Stairs 🟢 156 198 House Robber 🟡 157 213 House Robber II 🟡 158 5 Longest Palindromic Substring 🟡 159 647 Palindromic Substrings 🟡 160 91 Decode Ways 🟡 161 322 Coin Change 🟡 162 518 Coin Change II 🟡 163 300 Longest Increasing Subsequence 🟡 164 139 Word Break 🟡 165 377 Combination Sum IV 🟡 166 62 Unique Paths 🟡 167 63 Unique Paths II 🟡 168 64 Minimum Path Sum 🟡 169 1143 Longest Common Subsequence 🟡 170 72 Edit Distance 🔴 171 97 Interleaving String 🟡 172 152 Maximum Product Subarray 🟡 173 53 Maximum Subarray 🟡 174 309 Best Time to Buy and Sell Stock with Cooldown 🟡 175 188 Best Time to Buy and Sell Stock IV 🔴 176 416 Partition Equal Subset Sum 🟡 177 494 Target Sum 🟡 178 10 Regular Expression Matching 🔴 179 123 Best Time to Buy and Sell Stock III 🔴

Bit Manipulation & Math(8题)

180 136 Single Number 🟢 181 191 Number of 1 Bits 🟢 182 338 Counting Bits 🟢 183 190 Reverse Bits 🟢 184 268 Missing Number 🟢 185 371 Sum of Two Integers 🟡 186 7 Reverse Integer 🟡 187 50 Pow(x, n) 🟡

Matrix & Design(8题)

188 48 Rotate Image 🟡 189 54 Spiral Matrix 🟡 190 73 Set Matrix Zeroes 🟡 191 289 Game of Life 🟡 192 146 LRU Cache 🟡 193 155 Min Stack 🟡 194 208 Implement Trie (Prefix Tree) 🟡 195 295 Find Median from Data Stream 🔴

补充 5 道高价值题(196–200)

196 23 Merge k Sorted Lists 🔴 197 76 Minimum Window Substring 🔴 198 84 Largest Rectangle in Histogram 🔴 199 297 Serialize and Deserialize Binary Tree 🔴 200 124 Binary Tree Maximum Path Sum 🔴
说明

上一篇:AI学习小组(捆绑式拉练和高压集训)
下一篇:【超级干货求大米】937道最常见的leetcode题目按出现频率排名
🔗
 楼主| xiaojunji 6 小时前 | 只看该作者
全局:
不要只收藏啊,求大米
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

>
快速回复 返回顶部 返回列表