摘要: 还是用回溯法暴力解题,遍历所有可能,不过还是在此基础上进行了一些的优化,来阻止那些不必要的遍历。好,上代码。 class Sol... 阅读全文
posted @ 2020-05-12 16:29 clienter 阅读(84) 评论(0) 推荐(0)
摘要: 位运算 class Solution {public: vector> subsets(vector& nums) { ... 阅读全文
posted @ 2020-05-12 15:36 clienter 阅读(70) 评论(0) 推荐(0)
摘要: class Solution {public: vector> subsetsWithDup(vector& nums) { ... 阅读全文
posted @ 2020-05-12 15:33 clienter 阅读(81) 评论(0) 推荐(0)
摘要: 回溯法本身是种暴力解法,虽然效率之类的比较低,但是写起来比较易懂和快。在提交之后的排名也挺低的,大概就超过8%左右。以后复习的时候再... 阅读全文
posted @ 2020-05-12 15:26 clienter 阅读(76) 评论(0) 推荐(0)