2018年2月26日

关于访问某些404的网站

摘要: 首先,使虚拟机能访问404网站。参考别人的 然后,使虚拟机的终端能够访问404网站。这里需要使用局域网的ip。 export http_proxy="http://10.100.100.37:1080"export https_proxy="http://10.100.100.37:1080" 阅读全文

posted @ 2018-02-26 15:50 小问号??? 阅读(389) 评论(0) 推荐(0)

2018年2月1日

【LeetCode】5. Longest Palindromic Substring

摘要: 解析:两重循环,第二重循环是向两边扩展,判断是否相等。 阅读全文

posted @ 2018-02-01 21:15 小问号??? 阅读(76) 评论(0) 推荐(0)

2018年1月31日

【LeetCode】4. Median of Two Sorted Arrays

摘要: 自己虽然AC了,但是时间有点慢。网上找到一篇理论蛮容易理解的,就转过来了。我自己的做法就是模拟了一下,然后分类讨论。 原文是用C++实现,我这里用golang再实现了一下 转自:http://blog.csdn.net/hk2291976/article/details/51107778 问题介绍 阅读全文

posted @ 2018-01-31 18:32 小问号??? 阅读(120) 评论(0) 推荐(0)

【LeetCode】3. Longest Substring Without Repeating Characters

摘要: 传送门:https://leetcode.com/problems/longest-substring-without-repeating-characters/description/ 解析:定义一个头指针,记录当前子串的首位。尾指针不需要记录,遍历的时候,就相当于尾指针。当遇到已经出现过的字符时 阅读全文

posted @ 2018-01-31 10:07 小问号??? 阅读(70) 评论(0) 推荐(0)

2018年1月30日

【LeetCode】2. Add Two Numbers

摘要: 传送门:https://leetcode.com/problems/add-two-numbers/description/ 解析:模拟竖式加法即可,注意进位。 阅读全文

posted @ 2018-01-30 18:10 小问号??? 阅读(101) 评论(0) 推荐(0)

【LeetCode】1. Two Sum

摘要: 传送门:https://leetcode.com/problems/two-sum/description/ 解析:完全不需要两重循环,直接O(n)即可。我们这里利用到了map,当遍历到当前数字x时,我们就只需要寻找target-x即可,此时记下x的位置,那么当我们遍历到target-x时,m[ta 阅读全文

posted @ 2018-01-30 16:59 小问号??? 阅读(83) 评论(0) 推荐(0)

导航

点击右上角即可分享
微信分享提示