• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
neverlandly
博客园    首页    新随笔    联系   管理    订阅  订阅
2014年5月21日
Leetcode: Remove Duplicates from Sorted Array II
摘要: Follow up for "Remove Duplicates": What if duplicates are allowed at most twice? For example, Given sorted array A = [1,1,1,2,2,3], Your function shou 阅读全文
posted @ 2014-05-21 12:33 neverlandly 阅读(249) 评论(0) 推荐(0)
Leetcode: Subsets
摘要: Adopted approach: Notice that in line 11, you should create a copy of current path, and add it to res. Otherwise, it'll be edited later, and be wiped 阅读全文
posted @ 2014-05-21 12:25 neverlandly 阅读(574) 评论(1) 推荐(0)
Leetcode: Combinations
摘要: Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.For example,If n = 4 and k = 2, a solution is:[ [2,4], [3,4... 阅读全文
posted @ 2014-05-21 05:54 neverlandly 阅读(330) 评论(0) 推荐(0)
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3