• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
neverlandly
博客园    首页    新随笔    联系   管理    订阅  订阅
2016年12月14日
Leetcode: Sort Characters By Frequency
摘要: Bucket Sort + HashMap HashMap+ Heap+Wrapper Class 阅读全文
posted @ 2016-12-14 13:37 neverlandly 阅读(293) 评论(0) 推荐(0)
Leetcode: Delete Node in a BST
摘要: recursively find the node that needs to be deleted Once the node is found, have to handle the below 4 cases node doesn't have left nor right - return 阅读全文
posted @ 2016-12-14 12:19 neverlandly 阅读(500) 评论(0) 推荐(0)
Leetcode: Add Two Numbers II
摘要: The key of this problem is to think of using Stack 阅读全文
posted @ 2016-12-14 10:54 neverlandly 阅读(285) 评论(0) 推荐(0)
2Sigma OA prepare: Longest Chain
摘要: DP use HashMap: 根据string的长度sort,然后维护每个string的longest chain,default为1,如果删除某个char生成的string能提供更长的chain,则更新 阅读全文
posted @ 2016-12-14 08:19 neverlandly 阅读(8623) 评论(0) 推荐(0)
2Sigma OA prepare: Friends Circle
摘要: DFS & BFS: 关键在于构造graph 如果想把String[] array转化为2d char array, code如下,写的时候这里出了点小问题。friends是String[] Union Find 阅读全文
posted @ 2016-12-14 07:21 neverlandly 阅读(1555) 评论(0) 推荐(0)
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3