当前位置 博文首页 > 负雪明烛:LeetCode Top 100 Liked 点赞最高的 100 道算法题

    负雪明烛:LeetCode Top 100 Liked 点赞最高的 100 道算法题

    作者:[db:作者] 时间:2021-09-04 21:22

    作者: 负雪明烛
    id: fuxuemingzhu
    个人博客: http://fuxuemingzhu.cn/
    公众号:负雪明烛
    本文关键词:刷题顺序,刷题路径,好题,top100,怎么刷题,Leetcode, 力扣,Python, C++, Java


    大家好,相信很多朋友在刷题时,看到 LeetCode 的 2000 多道题目,有点手足无措,非常需要一个刷题的顺序和清单。

    我整理了在 LeetCode(中文版)上点赞数前 100 的题目,这些的题目基本都在千赞以上,全部都是好题。

    举个例子,1. Two Sum(两数之和)这个题目有着全站最高的点赞数:11757!!这题也是经典中的经典了,肯定要掌握的。
    在这里插入图片描述


    LeetCode top 100 liked 题目列表

    下面的表格根据 Likes 数目对题目进行了排序。

    题号英文题名中文题名难度likes 数标签中文力扣地址英文 LeetCode 地址
    1Two Sum两数之和Easy11757数组,哈希表https://leetcode-cn.com/problems/two-sum/https://leetcode.com/problems/two-sum/
    2Add Two Numbers两数相加Medium6524递归,链表,数学https://leetcode-cn.com/problems/add-two-numbers/https://leetcode.com/problems/add-two-numbers/
    3Longest Substring Without Repeating Characters无重复字符的最长子串Medium5845哈希表,字符串,滑动窗口https://leetcode-cn.com/problems/longest-substring-without-repeating-characters/https://leetcode.com/problems/longest-substring-without-repeating-characters/
    4Median of Two Sorted Arrays寻找两个正序数组的中位数Hard4303数组,二分查找,分治https://leetcode-cn.com/problems/median-of-two-sorted-arrays/https://leetcode.com/problems/median-of-two-sorted-arrays/
    5Longest Palindromic Substring最长回文子串Medium3896字符串,动态规划https://leetcode-cn.com/problems/longest-palindromic-substring/https://leetcode.com/problems/longest-palindromic-substring/
    153Sum三数之和Medium3582数组,双指针,排序https://leetcode-cn.com/problems/3sum/https://leetcode.com/problems/3sum/
    53Maximum Subarray最大子序和Easy3533数组,分治,动态规划https://leetcode-cn.com/problems/maximum-subarray/https://leetcode.com/problems/maximum-subarray/
    7Reverse Integer整数反转Easy2970数学https://leetcode-cn.com/problems/reverse-integer/https://leetcode.com/problems/reverse-integer/
    11Container With Most Water盛最多水的容器Medium2659贪心,数组,双指针https://leetcode-cn.com/problems/container-with-most-water/https://leetcode.com/problems/container-with-most-water/
    42Trapping Rain Water接雨水Hard2552栈,数组,双指针,动态规划,单调栈https://leetcode-cn.com/problems/trapping-rain-water/https://leetcode.com/problems/trapping-rain-water/
    20Valid Parentheses有效的括号Easy2544栈,字符串https://leetcode-cn.com/problems/valid-parentheses/https://leetcode.com/problems/valid-parentheses/
    10Regular Expression Matching正则表达式匹配Hard2273递归,字符串,动态规划https://leetcode-cn.com/problems/regular-expression-matching/https://leetcode.com/problems/regular-expression-matching/
    26Remove Duplicates from Sorted Array删除有序数组中的重复项Easy2146数组,双指针https://leetcode-cn.com/problems/remove-duplicates-from-sorted-array/https://leetcode.com/problems/remove-duplicates-from-sorted-array/
    136Single Number只出现一次的数字Easy1958位运算,数组https://leetcode-cn.com/problems/single-number/https://leetcode.com/problems/single-number/
    22Generate Parentheses括号生成Medium1946字符串,动态规划,回溯https://leetcode-cn.com/problems/generate-parentheses/https://leetcode.com/problems/generate-parentheses/
    206Reverse Linked List反转链表Easy1886递归,链表https://leetcode-cn.com/problems/reverse-linked-list/https://leetcode.com/problems/reverse-linked-list/
    21Merge Two Sorted Lists合并两个有序链表Easy1832递归,链表https://leetcode-cn.com/problems/merge-two-sorted-lists/https://leetcode.com/problems/merge-two-sorted-lists/
    70Climbing Stairs爬楼梯Easy1791记忆化搜索,数学,动态规划https://leetcode-cn.com/problems/climbing-stairs/https://leetcode.com/problems/climbing-stairs/
    300Longest Increasing Subsequence最长递增子序列Medium1773数组,二分查找,动态规划https://leetcode-cn.com/problems/longest-increasing-subsequence/https://leetcode.com/problems/longest-increasing-subsequence/
    121Best Time to Buy and Sell Stock买卖股票的最佳时机Easy1766数组,动态规划https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock/https://leetcode.com/problems/best-time-to-buy-and-sell-stock/
    72Edit Distance编辑距离Hard1743字符串,动态规划https://leetcode-cn.com/problems/edit-distance/https://leetcode.com/problems/edit-distance/
    14Longest Common Prefix最长公共前缀Easy1707字符串https://leetcode-cn.com/problems/longest-common-prefix/https://leetcode.com/problems/longest-common-prefix/
    198House Robber打家劫舍Medium1585数组,动态规划https://leetcode-cn.com/problems/house-robber/https://leetcode.com/problems/house-robber/
    9Palindrome Number回文数Easy1568数学https://leetcode-cn.com/problems/palindrome-number/https://leetcode.com/problems/palindrome-number/
    146LRU CacheLRU 缓存机制Medium1544设计,哈希表,链表,双向链表https://leetcode-cn.com/problems/lru-cache/https://leetcode.com/problems/lru-cache/
    19Remove Nth Node From End of List删除链表的倒数第 N 个结点Medium1494链表,双指针https://leetcode-cn.com/problems/remove-nth-node-from-end-of-list/https://leetcode.com/problems/remove-nth-node-from-end-of-list/
    33Search in Rotated Sorted Array搜索旋转排序数组Medium1493数组,二分查找https://leetcode-cn.com/problems/search-in-rotated-sorted-array/https://leetcode.com/problems/search-in-rotated-sorted-array/
    46Permutations全排列Medium1484数组,回溯https://leetcode-cn.com/problems/permutations/https://leetcode.com/problems/permutations/
    101Symmetric Tree对称二叉树Easy1483树,深度优先搜索,广度优先搜索,二叉树https://leetcode-cn.com/problems/symmetric-tree/https://leetcode.com/problems/symmetric-tree/
    84Largest Rectangle in Histogram柱状图中最大的矩形Hard1472栈,数组,单调栈https://leetcode-cn.com/problems/largest-rectangle-in-histogram/https://leetcode.com/problems/largest-rectangle-in-histogram/
    39Combination Sum组合总和Medium1466数组,回溯https://leetcode-cn.com/problems/combination-sum/https://leetcode.com/problems/combination-sum/
    13Roman to Integer罗马数字转整数Easy1436哈希表,数学,字符串https://leetcode-cn.com/problems/roman-to-integer/https://leetcode.com/problems/roman-to-integer/
    23Merge k Sorted Lists合并K个升序链表Hard1436链表,分治,堆(优先队列),归并排序https://leetcode-cn.com/problems/merge-k-sorted-lists/https://leetcode.com/problems/merge-k-sorted-lists/
    17Letter Combinations of a Phone Number电话号码的字母组合Medium1436哈希表,字符串,回溯https://leetcode-cn.com/problems/letter-combinations-of-a-phone-number/https://leetcode.com/problems/letter-combinations-of-a-phone-number/
    322Coin Change零钱兑换Medium1414广度优先搜索,数组,动态规划https://leetcode-cn.com/problems/coin-change/https://leetcode.com/problems/coin-change/
    32Longest Valid Parentheses最长有效括号Hard1400栈,字符串,动态规划https://leetcode-cn.com/problems/longest-valid-parentheses/https://leetcode.com/problems/longest-valid-parentheses/
    287Find the Duplicate Number寻找重复数Medium1325位运算,数组,双指针,二分查找https://leetcode-cn.com/problems/find-the-duplicate-number/https://leetcode.com/problems/find-the-duplicate-number/
    122Best Time to Buy and Sell Stock II买卖股票的最佳时机 IIEasy1306贪心,数组,动态规划https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock-ii/https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/
    160Intersection of Two Linked Lists相交链表Easy1302哈希表,链表,双指针https://leetcode-cn.com/problems/intersection-of-two-linked-lists/https://leetcode.com/problems/intersection-of-two-linked-lists/
    55Jump Game跳跃游戏Medium1292贪心,数组,动态规划https://leetcode-cn.com/problems/jump-game/https://leetcode.com/problems/jump-game/
    76Minimum Window Substring最小覆盖子串Hard1280哈希表,字符串,滑动窗口https://leetcode-cn.com/problems/minimum-window-substring/https://leetcode.com/problems/minimum-window-substring/
    200Number of Islands岛屿数量Medium1270深度优先搜索,广度优先搜索,并查集,数组,矩阵https://leetcode-cn.com/problems/number-of-islands/https://leetcode.com/problems/number-of-islands/
    78Subsets子集Medium1269位运算,数组,回溯https://leetcode-cn.com/problems/subsets/https://leetcode.com/problems/subsets/
    31Next Permutation下一个排列Medium1260数组,双指针https://leetcode-cn.com/problems/next-permutation/https://leetcode.com/problems/next-permutation/
    96Unique Binary Search Trees不同的二叉搜索树Medium1257树,二叉搜索树,数学,动态规划,二叉树https://leetcode-cn.com/problems/unique-binary-search-trees/https://leetcode.com/problems/unique-binary-search-trees/
    148Sort List排序链表Medium1248链表,双指针,分治,排序,归并排序https://leetcode-cn.com/problems/sort-list/https://leetcode.com/problems/sort-list/
    236Lowest Common Ancestor of a Binary Tree二叉树的最近公共祖先Medium1238树,深度优先搜索,二叉树https://leetcode-cn.com/problems/lowest-common-ancestor-of-a-binary-tree/https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/
    25Reverse Nodes in k-GroupK 个一组翻转链表Hard1230递归,链表https://leetcode-cn.com/problems/reverse-nodes-in-k-group/https://leetcode.com/problems/reverse-nodes-in-k-group/
    6ZigZag ConversionZ 字形变换Medium1226字符串https://leetcode-cn.com/problems/zigzag-conversion/https://leetcode.com/problems/zigzag-conversion/
    152Maximum Product Subarray乘积最大子数组Medium1223数组,动态规划https://leetcode-cn.com/problems/maximum-product-subarray/https://leetcode.com/problems/maximum-product-subarray/
    215Kth Largest Element in an Array数组中的第K个最大元素Medium1211数组,分治,快速选择,排序,堆(优先队列)https://leetcode-cn.com/problems/kth-largest-element-in-an-array/https://leetcode.com/problems/kth-largest-element-in-an-array/
    8String to Integer (atoi)字符串转换整数 (atoi)Medium1168字符串https://leetcode-cn.com/problems/string-to-integer-atoi/https://leetcode.com/problems/string-to-integer-atoi/
    41First Missing Positive缺失的第一个正数Hard1163数组,哈希表https://leetcode-cn.com/problems/first-missing-positive/https://leetcode.com/problems/first-missing-positive/
    283Move Zeroes移动零Easy1162数组,双指针https://leetcode-cn.com/problems/move-zeroes/https://leetcode.com/problems/move-zeroes/
    141Linked List Cycle环形链表Easy1161哈希表,链表,双指针https://leetcode-cn.com/problems/linked-list-cycle/https://leetcode.com/problems/linked-list-cycle/
    98Validate Binary Search Tree验证二叉搜索树Medium1156树,深度优先搜索,二叉搜索树,二叉树https://leetcode-cn.com/problems/validate-binary-search-tree/https://leetcode.com/problems/validate-binary-search-tree/
    124Binary Tree Maximum Path Sum二叉树中的最大路径和Hard1152树,深度优先搜索,动态规划,二叉树https://leetcode-cn.com/problems/binary-tree-maximum-path-sum/https://leetcode.com/problems/binary-tree-maximum-path-sum/
    105Construct Binary Tree from Preorder and Inorder Traversal从前序与中序遍历序列构造二叉树Medium1149树,数组,哈希表,分治,二叉树https://leetcode-cn.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/
    34Find First and Last Position of Element in Sorted Array在排序数组中查找元素的第一个和最后一个位置Medium1137数组,二分查找https://leetcode-cn.com/problems/find-first-and-last-position-of-element-in-sorted-array/https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/
    239Sliding Window Maximum滑动窗口最大值Hard1114队列,数组,滑动窗口,单调队列,堆(优先队列)https://leetcode-cn.com/problems/sliding-window-maximum/https://leetcode.com/problems/sliding-window-maximum/
    142Linked List Cycle II环形链表 IIMedium1097哈希表,链表,双指针https://leetcode-cn.com/problems/linked-list-cycle-ii/https://leetcode.com/problems/linked-list-cycle-ii/
    139Word Break单词拆分Medium1097字典树,记忆化搜索,哈希表,字符串,动态规划https://leetcode-cn.com/problems/word-break/https://leetcode.com/problems/word-break/
    45Jump Game II跳跃游戏 IIMedium1094贪心,数组,动态规划https://leetcode-cn.com/problems/jump-game-ii/https://leetcode.com/problems/jump-game-ii/
    169Majority Element多数元素Easy1089数组,哈希表,分治,计数,排序https://leetcode-cn.com/problems/majority-element/https://leetcode.com/problems/majority-element/
    234Palindrome Linked List回文链表Easy1072栈,递归,链表,双指针https://leetcode-cn.com/problems/palindrome-linked-list/https://leetcode.com/problems/palindrome-linked-list/
    62Unique Paths不同路径Medium1072数学,动态规划,组合数学https://leetcode-cn.com/problems/unique-paths/https://leetcode.com/problems/unique-paths/
    189Rotate Array旋转数组Medium1057数组,数学,双指针https://leetcode-cn.com/problems/rotate-array/https://leetcode.com/problems/rotate-array/
    94Binary Tree Inorder Traversal二叉树的中序遍历Easy1052栈,树,深度优先搜索,二叉树https://leetcode-cn.com/problems/binary-tree-inorder-traversal/https://leetcode.com/problems/binary-tree-inorder-traversal/
    56Merge Intervals合并区间Medium1051数组,排序https://leetcode-cn.com/problems/merge-intervals/https://leetcode.com/problems/merge-intervals/
    88Merge Sorted Array合并两个有序数组Easy1041数组,双指针,排序https://leetcode-cn.com/problems/merge-sorted-array/https://leetcode.com/problems/merge-sorted-array/
    560Subarray Sum Equals K和为K的子数组Medium1036数组,哈希表,前缀和https://leetcode-cn.com/problems/subarray-sum-equals-k/https://leetcode.com/problems/subarray-sum-equals-k/
    279Perfect Squares完全平方数Medium1035广度优先搜索,数学,动态规划https://leetcode-cn.com/problems/perfect-squares/https://leetcode.com/problems/perfect-squares/
    35Search Insert Position搜索插入位置Easy1005数组,二分查找https://leetcode-cn.com/problems/search-insert-position/https://leetcode.com/problems/search-insert-position/
    24Swap Nodes in Pairs两两交换链表中的节点Medium996递归,链表https://leetcode-cn.com/problems/swap-nodes-in-pairs/https://leetcode.com/problems/swap-nodes-in-pairs/
    85Maximal Rectangle最大矩形Hard983栈,数组,动态规划,矩阵,单调栈https://leetcode-cn.com/problems/maximal-rectangle/https://leetcode.com/problems/maximal-rectangle/
    28Implement strStr()实现 strStr()Easy982双指针,字符串,字符串匹配https://leetcode-cn.com/problems/implement-strstr/https://leetcode.com/problems/implement-strstr/
    92Reverse Linked List II反转链表 IIMedium980链表https://leetcode-cn.com/problems/reverse-linked-list-ii/https://leetcode.com/problems/reverse-linked-list-ii/
    155Min Stack最小栈Easy979栈,设计https://leetcode-cn.com/problems/min-stack/https://leetcode.com/problems/min-stack/
    79Word Search单词搜索Medium979数组,回溯,矩阵https://leetcode-cn.com/problems/word-search/https://leetcode.com/problems/word-search/
    27Remove Element移除元素Easy967数组,双指针https://leetcode-cn.com/problems/remove-element/https://leetcode.com/problems/remove-element/
    51N-QueensN 皇后Hard965数组,回溯https://leetcode-cn.com/problems/n-queens/https://leetcode.com/problems/n-queens/
    75Sort Colors颜色分类Medium961数组,双指针,排序https://leetcode-cn.com/problems/sort-colors/https://leetcode.com/problems/sort-colors/
    102Binary Tree Level Order Traversal二叉树的层序遍历Medium960树,广度优先搜索,二叉树https://leetcode-cn.com/problems/binary-tree-level-order-traversal/https://leetcode.com/problems/binary-tree-level-order-traversal/
    48Rotate Image旋转图像Medium960数组,数学,矩阵https://leetcode-cn.com/problems/rotate-image/https://leetcode.com/problems/rotate-image/
    95Unique Binary Search Trees II不同的二叉搜索树 IIMedium955树,二叉搜索树,动态规划,回溯,二叉树https://leetcode-cn.com/problems/unique-binary-search-trees-ii/https://leetcode.com/problems/unique-binary-search-trees-ii/
    64Minimum Path Sum最小路径和Medium954数组,动态规划,矩阵https://leetcode-cn.com/problems/minimum-path-sum/https://leetcode.com/problems/minimum-path-sum/
    406Queue Reconstruction by Height根据身高重建队列Medium947贪心,数组,排序https://leetcode-cn.com/problems/queue-reconstruction-by-height/https://leetcode.com/problems/queue-reconstruction-by-height/
    226Invert Binary Tree翻转二叉树Easy941树,深度优先搜索,广度优先搜索,二叉树https://leetcode-cn.com/problems/invert-binary-tree/https://leetcode.com/problems/invert-binary-tree/
    437Path Sum III路径总和 IIIMedium937树,深度优先搜索,二叉树https://leetcode-cn.com/problems/path-sum-iii/https://leetcode.com/problems/path-sum-iii/
    104Maximum Depth of Binary Tree二叉树的最大深度Easy937树,深度优先搜索,广度优先搜索,二叉树https://leetcode-cn.com/problems/maximum-depth-of-binary-tree/https://leetcode.com/problems/maximum-depth-of-binary-tree/
    237Delete Node in a Linked List删除链表中的节点Easy936链表https://leetcode-cn.com/problems/delete-node-in-a-linked-list/https://leetcode.com/problems/delete-node-in-a-linked-list/
    337House Robber III打家劫舍 IIIMedium929树,深度优先搜索,动态规划,二叉树https://leetcode-cn.com/problems/house-robber-iii/https://leetcode.com/problems/house-robber-iii/
    184Sum四数之和Medium918数组,双指针,排序https://leetcode-cn.com/problems/4sum/https://leetcode.com/problems/4sum/
    91Decode Ways解码方法Medium904字符串,动态规划https://leetcode-cn.com/problems/decode-ways/https://leetcode.com/problems/decode-ways/
    207Course Schedule课程表Medium897深度优先搜索,广度优先搜索,图,拓扑排序https://leetcode-cn.com/problems/course-schedule/https://leetcode.com/problems/course-schedule/
    37Sudoku Solver解数独Hard897数组,回溯,矩阵https://leetcode-cn.com/problems/sudoku-solver/https://leetcode.com/problems/sudoku-solver/
    175Combine Two Tables组合两个表Easy891数据库https://leetcode-cn.com/problems/combine-two-tables/https://leetcode.com/problems/combine-two-tables/
    416Partition Equal Subset Sum分割等和子集Medium886数组,动态规划https://leetcode-cn.com/problems/partition-equal-subset-sum/https://leetcode.com/problems/partition-equal-subset-sum/
    238Product of Array Except Self除自身以外数组的乘积Medium885数组,前缀和https://leetcode-cn.com/problems/product-of-array-except-self/https://leetcode.com/problems/product-of-array-except-self/
    114Flatten Binary Tree to Linked List二叉树展开为链表Medium877栈,树,深度优先搜索,链表,二叉树https://leetcode-cn.com/problems/flatten-binary-tree-to-linked-list/https://leetcode.com/problems/flatten-binary-tree-to-linked-list/

    2021 年 8 月 8 日于北京

    cs