• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
neverlandly
博客园    首页    新随笔    联系   管理    订阅  订阅
2016年12月5日
G 面经 && Leetcode: Longest Repeating Character Replacement
摘要: 真是被这道题气死了,总是弄不对 The problem says that we can make at most k changes to the string (any character can be replaced with any other character). So, let's 阅读全文
posted @ 2016-12-05 13:58 neverlandly 阅读(442) 评论(0) 推荐(0)
Leetcode: Reconstruct Original Digits from English
摘要: # of '0': # of 'z' # of '2': # of 'w' 4: u 6: x 8: g 3: h - 8 5: f - 4 7: s - 6 1: o - 0 - 2 - 4 9: i - 5 - 6 - 8 我的code用了一个数组来存char count 阅读全文
posted @ 2016-12-05 08:51 neverlandly 阅读(362) 评论(0) 推荐(0)
Leetcode: Maximum XOR of Two Numbers in an Array
摘要: Solution 1: Bit Manipulation: 这题真心有点难,get the max XOR bit by bit note that if A^B=C, then A^C=B, B^C=A Solution 2: Trie, (未研究) https://discuss.leetcod 阅读全文
posted @ 2016-12-05 07:48 neverlandly 阅读(552) 评论(0) 推荐(0)
Leetcode: Battleships in a Board
摘要: 只计算每个battleship的第一个元素,所以后面‘X’如果above或者left也是'X'的话,不被计算 阅读全文
posted @ 2016-12-05 06:10 neverlandly 阅读(431) 评论(0) 推荐(0)
Leetcode: Split Array Largest Sum
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2016-12-05 04:44 neverlandly 阅读(546) 评论(0) 推荐(0)
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3