10 2017 档案

摘要:Find the Duplicate Number Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one dup 阅读全文
posted @ 2017-10-28 16:56 qlky 阅读(1128) 评论(0) 推荐(0)
摘要:条件: a[j] + a[j+1] < x*2 阅读全文
posted @ 2017-10-27 16:36 qlky 阅读(261) 评论(0) 推荐(0)
摘要:[LeetCode(Q69)] Sqrt(x) (编程实现sqrt) Q: Implement int sqrt(int x). Compute and return the square root of x. A: 这里给出两种实现方法:一是二分搜索,二是牛顿迭代法。 1. 二分搜索 对于一个非负 阅读全文
posted @ 2017-10-26 08:54 qlky 阅读(20712) 评论(0) 推荐(3)
摘要:Replace Words 一开始我的思路: HashSet + StringBuilder,每个词遍历在set中查找。 但效率并不高,这道题最好的解法其实是用前缀树(Trie / Prefix Tree)来做,关于前缀树使用之前有一道很好的入门题Implement Trie (Prefix Tre 阅读全文
posted @ 2017-10-21 18:35 qlky 阅读(1228) 评论(0) 推荐(0)
摘要:机器学习并没有那么深奥,它很有趣(2) 阅读全文
posted @ 2017-10-20 19:59 qlky 阅读(119) 评论(0) 推荐(0)
摘要:https://leetcode.com/problems/binary-tree-inorder-traversal/description http://blog.csdn.net/linhuanmars/article/details/20187257 阅读全文
posted @ 2017-10-18 16:07 qlky 阅读(197) 评论(0) 推荐(0)
摘要:原题: https://leetcode.com/problems/longest-substring-without-repeating-characters/description/ 参考: [LeetCode] Longest Substring Without Repeating Chara 阅读全文
posted @ 2017-10-18 15:33 qlky 阅读(157) 评论(0) 推荐(0)
摘要:Top K Frequent Elements 347. Top K Frequent Elements [LeetCode] Top K Frequent Elements 前K个高频元素 阅读全文
posted @ 2017-10-16 16:19 qlky 阅读(131) 评论(0) 推荐(0)
摘要:这道题,当值>128时,map.get() != map.get() 会出现错误结果,但不知道为什么 阅读全文
posted @ 2017-10-15 21:54 qlky 阅读(509) 评论(0) 推荐(0)
摘要:如何正确高效地使用LeetCode? LeetCode按照怎样的顺序来刷题比较好? LeetCode 题目总结/分类 Leetcode 简略题解 - 共567题 500. Keyboard Row [LeetCode] Keyboard Row 键盘行 阅读全文
posted @ 2017-10-11 23:39 qlky 阅读(178) 评论(0) 推荐(0)
摘要:java -- JVM的符号引用和直接引用 https://www.zhihu.com/question/50258991 在JVM中类加载过程中,在解析阶段,Java虚拟机会把类的二级制数据中的符号引用替换为直接引用。 1.符号引用(Symbolic References): 符号引用以一组符号来 阅读全文
posted @ 2017-10-09 23:18 qlky 阅读(12811) 评论(2) 推荐(2)