• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
neverlandly
博客园    首页    新随笔    联系   管理    订阅  订阅
2016年12月18日
Leetcode: Design Phone Directory
摘要: my HashSet+ ArrayList, 删除的时候把要删的index与末尾对调。get()其实不需要random, 因为anyone is ok HashSet+ Queue网上vote最高的solution, 阅读全文
posted @ 2016-12-18 13:37 neverlandly 阅读(340) 评论(0) 推荐(0)
Leetcode: Valid Word Abbreviation
摘要: Given a non-empty string s and an abbreviation abbr, return whether the string matches with the given abbreviation. A string such as "word" contains only the following valid abbreviations: ["word",... 阅读全文
posted @ 2016-12-18 12:49 neverlandly 阅读(529) 评论(0) 推荐(0)
Leetcode: Range Addition
摘要: Time Complexity: O(N+K), Space: O(1) 阅读全文
posted @ 2016-12-18 11:49 neverlandly 阅读(332) 评论(0) 推荐(0)
Leetcode: Find Leaves of Binary Tree
摘要: Better Solution: https://discuss.leetcode.com/topic/49194/10-lines-simple-java-solution-using-recursion-with-explanation/2 For this question we need t 阅读全文
posted @ 2016-12-18 09:12 neverlandly 阅读(296) 评论(0) 推荐(0)
Leetcode: Design Hit Counter
摘要: Use Queue Better Solution: can solve follow up, refer to https://discuss.leetcode.com/topic/48758/super-easy-design-o-1-hit-o-s-gethits-no-fancy-data- 阅读全文
posted @ 2016-12-18 07:56 neverlandly 阅读(722) 评论(0) 推荐(0)
Leetcode: Bomb Enemy
摘要: Walk through the matrix. At the start of each non-wall-streak (row-wise or column-wise), count the number of hits in that streak and remember it. For 阅读全文
posted @ 2016-12-18 06:52 neverlandly 阅读(499) 评论(0) 推荐(0)
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3