摘要: Note: 1. If it does not belong any sequences : append.getOrDefault(num, 0) == 0, create a new sequence. It requires num + 1 and num + 2 count > 0. 2. 阅读全文
posted @ 2017-09-10 14:42 keepshuatishuati 阅读(175) 评论(0) 推荐(0) 编辑
摘要: Note: k different could be [1, k+1] are in wiggle sort order. Then there are k different numbers. But in this case, the last difference definitely wil 阅读全文
posted @ 2017-09-10 13:38 keepshuatishuati 阅读(148) 评论(0) 推荐(0) 编辑
摘要: Note: Basic idea could be same as Kth smallest number in sorted matrix. But this could be different since all the numbers fall in [1, m*n + 1] range. 阅读全文
posted @ 2017-09-10 13:18 keepshuatishuati 阅读(637) 评论(0) 推荐(0) 编辑
摘要: class Solution { private final String[] map = {"", "", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz"}; public List letterCombinations(String digits) { List result = new Arr... 阅读全文
posted @ 2017-09-10 06:32 keepshuatishuati 阅读(127) 评论(0) 推荐(0) 编辑