摘要: "303. Range Sum Query Immutable" 算法思路: (记 ). 时间复杂度: . 空间复杂度: . "C++ O(1) queries just 2 extra lines of code" 使用了 " 函数" . 阅读全文
posted @ 2015-12-20 16:45 柳正来 阅读(255) 评论(0) 推荐(0) 编辑
摘要: "306. Additive Number" 算法思路: 字符串加法 + 回溯 时间复杂度: 空间复杂度: `O(n)` 阅读全文
posted @ 2015-12-20 13:34 柳正来 阅读(246) 评论(0) 推荐(0) 编辑
摘要: "315. Count of Smaller Numbers After Self" 算法思想: 从右端折半插入. 对于每个数字来说, 就是该数字的 .时间复杂度: .空间复杂度: .<span class="my comment" 还有更快的方法. 以后更新.</span 阅读全文
posted @ 2015-12-20 01:26 柳正来 阅读(178) 评论(0) 推荐(0) 编辑