摘要:
在Thread类中,存在一个State枚举: public enum State { /** * Thread state for a thread which has not yet started. */ NEW, /** * Thread state for a runnable thread 阅读全文
摘要:
错误思路: 一开始是按完全背包问题去解决,即外层循环为数组,内层循环为target,结果不对,因为每一个target可以以数组中任何数字结尾。题目中虽然写着组合,但其实这是一个排列问题,与顺序有关。 错误代码如下: public int combinationSum4(int[] nums, int 阅读全文