前期准备 systemctl stop firewalldsystemctl disable firewalld yum -y install ntp systemctl start ntpdsystemctl enable ntpd yum update -y 安装etcd Kubernetes ...
分类:
其他好文 时间:
2017-10-19 10:35:35
阅读次数:
223
题目链接:https://leetcode.com/problems/linked-list-cycle/description/ 题目大意:给出一个链表,判断该链表是否有环,空间复杂度最好控制在o(1) 这个题没有给测试用例,导致没太明白题目意思,看了题解,用了两种方法示例如下: 法一(借鉴):利 ...
分类:
其他好文 时间:
2017-10-18 16:07:59
阅读次数:
138
pod本身是无状态,所以很多有状态的应用,就需要将数据进行持久化。 1:将数据挂在到宿主机。但是pod重启之后有可能到另外一个节点,这样数据虽然不会丢但是还是有可能会找不到 2:挂到外部存储,如nfs 上述说的是简单的存储方法,直接在deployment中定义了具体的存储,但是这样会存在几个问题。 ...
分类:
Web程序 时间:
2017-10-18 15:28:47
阅读次数:
175
141. Linked List Cycle Given a linked list, determine if it has a cycle in it. Follow up:Can you solve it without using extra space? ...
分类:
其他好文 时间:
2017-10-17 12:28:24
阅读次数:
147
Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Note: Do not modify the linked list. Follow up:Can you ...
分类:
其他好文 时间:
2017-10-16 23:29:46
阅读次数:
228
http://algs4.cs.princeton.edu/code/edu/princeton/cs/algs4/ http://algs4.cs.princeton.edu/code/edu/princeton/cs/algs4/BinarySearchST.java http://algs4. ...
分类:
编程语言 时间:
2017-10-16 01:52:41
阅读次数:
229
使用快慢指针,如果有环快慢指针一定会相遇 class Solution {public: bool hasCycle(ListNode *head) { ListNode *fast, *slow; fast = slow = head; while(slow && fast) { slow = s ...
分类:
其他好文 时间:
2017-10-13 22:29:58
阅读次数:
89
http://acm.split.hdu.edu.cn/showproblem.php?pid=5782 题意:给出两个长度相等的字符串,输出两个字符的每个前缀是否循环相同。 思路: 如果连个串循环相同的话,那一定可以找到一个位置,使得第一个串的前缀等于另一个串的后缀。这样的话其实就是扩展kmp的思 ...
分类:
其他好文 时间:
2017-10-13 20:12:44
阅读次数:
156
Given a linked list, determine if it has a cycle in it. Given a linked list, determine if it has a cycle in it. Given a linked list, determine if it h ...
分类:
其他好文 时间:
2017-10-13 14:02:28
阅读次数:
146
http://note.youdao.com/noteshare?id=7f2e4e00fae3f8f1de10796a1c6a90ec compile 'com.android.support:mediarouter-v7:25.0.0' compile 'com.android.support: ...
分类:
其他好文 时间:
2017-10-13 10:28:51
阅读次数:
176