摘要:
真是被这道题气死了,总是弄不对 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)
摘要:
# 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)
摘要:
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)
摘要:
只计算每个battleship的第一个元素,所以后面‘X’如果above或者left也是'X'的话,不被计算 阅读全文
posted @ 2016-12-05 06:10
neverlandly
阅读(431)
评论(0)
推荐(0)
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2016-12-05 04:44
neverlandly
阅读(546)
评论(0)
推荐(0)
浙公网安备 33010602011771号