629 K Inverse Pairs Array Hard 23.90% 630 Course Schedule III Medium 20.50% 631 Design Excel Sum Formula $ Hard 25.60% 632 Smallest Range Hard 42.80% 633 Sum of Square Numbers Easy 31.60% 634 Find the Derangement of An Array $ Medium 32.70% 635 Design Log Storage System $ Medium 47.70% ...
Problem Statement dp[i][j]: the number of subsets of A[0, i] whose sum is j. dp[0][0] = 1, there is only 1 way of not picking anything from an empty array to achieve sum 0. Answer is dp[N][S] State Transition: case 1, not using A[i] : all the subsets of A[0, i...
698 划分为k个相等的子集 - Partition to K Equal Sum Subsets C++ Java Python3 Medium 697 数组的度 - Degree of an Array C++ Java Python3 Easy 696 计数二进制子串 - Count Binary Substrings C++ Java Python3 Easy 695 岛屿的最大面积 - Max Area of Island C++ Java Python3 Medium 694 C++ Jav...
1334 Find the City With the Smallest Number of Neighbors at a Threshold Distance 57.70% Medium 1333 "Filter Restaurants by Vegan-Friendly Price and Distance" 60.50% 1332 Remove Palindromic Subsequences 76.20% Easy 1331 Rank Transform of an Array 59.80% Easy 1330 Reverse Subarray To Maximize Array...
终于将LeetCode的免费题刷完了,真是漫长的第一遍啊,估计很多题都忘的差不多了,这次开个题目汇总贴,并附上每道题目的解题连接,方便之后查阅吧~ 如果各位看官们,大神们发现了任何错误,或是代码无法通过OJ,或是有更好的解法,或是有任何疑问,意见和建议的话,请一定要
终于将LeetCode的大部分题刷完了,真是漫长的第一遍啊,估计很多题都忘的差不多了,这次开个题目汇总贴,并附上每道题目的解题连接,方便之后查阅吧~ 博主还制作了一款 网页版APP,方便大家进行查阅,网址如下: https://grandyang.com 对应的 Github 项目 的同步地址如下,欢迎大家关注点赞 ️ https://github....
0078-subsets Time: 1 ms (57.66%), Space: 42.8 MB (26.76%) - LeetHub May 22, 2024 0079-word-search Time: 218 ms (20.70%), Space: 45.2 MB (9.18%) - LeetHub Apr 3, 2024 0081-search-in-rotated-sorted-array-ii Time: 0 ms (100.00%), Space: 42.6 MB (93.61%) - LeetHub Sep...
search in an array 090.Subsets-II (M+) 301.Remove-Invalid-Parentheses (H) 473.Matchsticks-to-Square (M+) 491.Increasing-Subsequences (M) 698.Partition-to-K-Equal-Sum-Subsets (H-) 996.Number-of-Squareful-Arrays (H-) 1307.Verbal-Arithmetic-Puzzle (H) 1593.Split-a-String-Into-the-Max...
1334 Find the City With the Smallest Number of Neighbors at a Threshold Distance 57.70% Medium 1333 "Filter Restaurants by Vegan-Friendly Price and Distance" 60.50% 1332 Remove Palindromic Subsequences 76.20% Easy 1331 Rank Transform of an Array 59.80% Easy 1330 Reverse Subarray To Maximize Array...
694 Number of Distinct Islands 0.450 Medium 695 Max Area of Island 0.517 Easy 696 Count Binary Substrings 0.506 Easy 697 Degree of an Array 0.468 Easy 698 Partition to K Equal Sum Subsets 0.375 Medium 699 Falling Squares 0.367 Hard 711 Number of Distinct Islands II 0.416 Hard 712 Minimum ASC...