2016年2月18日
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2016-02-18 16:55 xwang2014 阅读(7) 评论(0) 推荐(0) 编辑
  2016年2月15日
摘要: Refer: https://www.hrwhisper.me/leetcode-patching-array/ 就是用known_sum表示已知的连续和为[1,known_sum),有了这个表示那就简单了: nums[i] <= known_sum,更新已知范围为:[1,known_sum + n 阅读全文
posted @ 2016-02-15 09:33 xwang2014 阅读(283) 评论(0) 推荐(0) 编辑
摘要: Refer: https://segmentfault.com/a/1190000003059361 O(n^2) Solution public String shortestPalindrome(String s) { if(s == null || s.length() <= 1) retur 阅读全文
posted @ 2016-02-15 08:44 xwang2014 阅读(204) 评论(0) 推荐(0) 编辑
  2016年1月24日
摘要: LeetCode Wiggle Sort I && IIpublic class WiggleSort { /* Wiggle Sort I Given an unsorted array nums, reorder it in-place such that nums[0] = nums... 阅读全文
posted @ 2016-01-24 13:43 xwang2014 阅读(514) 评论(1) 推荐(0) 编辑