• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
neverlandly
博客园    首页    新随笔    联系   管理    订阅  订阅
2015年12月24日
Leetcode: Closest Binary Search Tree Value II
摘要: Given a non-empty binary search tree and a target value, find k values in the BST that are closest to the target.Note:Given target value is a floating... 阅读全文
posted @ 2015-12-24 13:14 neverlandly 阅读(324) 评论(0) 推荐(0)
Leetcode: Encode and Decode Strings
摘要: If I choose / as spliter, how to ensure the other / wouldn't be seen as spliter? The idea is to store length of the str This one will be encoded as "6 阅读全文
posted @ 2015-12-24 12:27 neverlandly 阅读(452) 评论(0) 推荐(0)
Leetcode: Closest Binary Search Tree Value
摘要: Given a non-empty binary search tree and a target value, find the value in the BST that is closest to the target.Note:Given target value is a floating... 阅读全文
posted @ 2015-12-24 09:47 neverlandly 阅读(294) 评论(0) 推荐(0)
Leetcode: Missing Number
摘要: Best Solution: Bit manipulation The basic idea is to use XOR operation. We all know that a^b^b =a, which means two xor operations with the same number 阅读全文
posted @ 2015-12-24 08:50 neverlandly 阅读(276) 评论(0) 推荐(0)
Leetcode: Graph Valid Tree && Summary: Detect cycle in undirected graph
摘要: This problem can be solved by using union find, reference this blog:https://segmentfault.com/a/1190000003791051 复杂度 时间 O(N^M) 空间 O(N) 思路 判断输入的边是否能构成一个 阅读全文
posted @ 2015-12-24 02:58 neverlandly 阅读(1008) 评论(0) 推荐(0)
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3