问题 :https://leetcode-cn.com/problems/bitwise-ors-of-subarrays/
解:https://gitee.com/footmanff/leetcode/blob/master/src/main/java/com/footmanff/leetcode/dp/P898_1.java
问题 :https://leetcode-cn.com/problems/bitwise-ors-of-subarrays/
解:https://gitee.com/footmanff/leetcode/blob/master/src/main/java/com/footmanff/leetcode/dp/P898_1.java
问题 :https://leetcode-cn.com/problems/single-number/
解:https://gitee.com/footmanff/leetcode/blob/master/src/main/java/com/footmanff/leetcode/P136.java
问题 :https://leetcode-cn.com/problems/longest-valid-parentheses/
解:https://gitee.com/footmanff/leetcode/blob/master/src/main/java/com/footmanff/leetcode/dp/P32.java
问题 :https://leetcode-cn.com/problems/first-missing-positive/
解:https://gitee.com/footmanff/leetcode/blob/master/src/main/java/com/footmanff/leetcode/P41_2.java
要求:
间复杂度应为O(n),并且只能使用常数级别的额外空间
问题 :https://leetcode-cn.com/problems/partition-equal-subset-sum/
解:https://gitee.com/footmanff/leetcode/blob/master/src/main/java/com/footmanff/leetcode/P416.java
动态规划
基本思想:如果前 n 个数,组成的和是 s1、s2,此时如果再加上下一个数 next,组成的和是 0 + next、s1 + next、s2 + next。
问题 :https://leetcode-cn.com/problems/combination-sum/
解:https://gitee.com/footmanff/leetcode/blob/master/src/main/java/com/footmanff/leetcode/P39_1.java