摘要:
Similar with "Longest Consecutive Sequence". Another usage to hashset.Take care of corner cases!class Solution {public: int firstMissingPositive(in... 阅读全文
摘要:
Similar with "Climb stairs" but with more restrictions.// Ref: http://yucoding.blogspot.com/2013/01/leetcode-question-26-decode-ways.htmlclass Solu... 阅读全文
摘要:
Typical recurrsion\DFS problem. Just take care of memory use.class Solution {public: vector> ret; void go(int currMaxN, int currK, int k, unorde... 阅读全文