摘要: Total Accepted: 57856Total Submissions: 137040Difficulty: MediumContributors: AdminGiven a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking ... 阅读全文
posted @ 2017-02-20 16:18 copperface 阅读(133) 评论(0) 推荐(0) 编辑
摘要: Total Accepted: 133535Total Submissions: 292943Difficulty: EasyContributors: AdminWrite a function to delete a node (except the tail) in a singly linked list, given only access to that node.Supposed t... 阅读全文
posted @ 2017-02-20 16:05 copperface 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 初始值 slow = fast = head;如果使用fast && fast->next && fast->next->next 作为快慢指针循环条件,返回的mid如下:1,2,3,4,5 31,2,3,4,5,6 31,2,3,4,5,6,7 4....即偶数个时候,返回的是左半边最后一个如果使用fast && fast->next 作为快慢指针循环条件,返... 阅读全文
posted @ 2017-02-20 15:46 copperface 阅读(225) 评论(0) 推荐(0) 编辑
摘要: Total Accepted: 88244Total Submissions: 277193Difficulty: EasyContributors: AdminGiven a singly linked list, determine if it is a palindrome.Follow up:Could you do it in O(n) time and O(1) space?来源: h... 阅读全文
posted @ 2017-02-20 15:42 copperface 阅读(171) 评论(0) 推荐(0) 编辑
摘要: Total Accepted: 99807Total Submissions: 319528Difficulty: EasyContributors: AdminRemove all elements from a linked list of integers that have value val.ExampleGiven: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --... 阅读全文
posted @ 2017-02-20 15:30 copperface 阅读(177) 评论(0) 推荐(0) 编辑
摘要: Total Accepted: 84681Total Submissions: 341465Difficulty: MediumContributors: AdminGiven a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without... 阅读全文
posted @ 2017-02-20 15:25 copperface 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 1. 首先使用 docker images 查看已有镜像:2. 获得 docker-whale 的 IMAGE ID,然后为 docker-whale 镜像 image 打上标签 Tag。使用命令:3. 再次运行 docker images,会发现有一个和docker-whale IMAGE ID一模一样的镜像,yourname/docker-whale4. 在powershell中登录 dock... 阅读全文
posted @ 2017-02-20 13:37 copperface 阅读(180) 评论(0) 推荐(0) 编辑
摘要: docker run 命令镜像(image):An image is a filesystem and parameters to use at runtime. It doesn’t have state and never changes容器(container): A container is a running instance of an image.简言之,容器是镜像的实例。运行命令的... 阅读全文
posted @ 2017-02-20 13:25 copperface 阅读(890) 评论(0) 推荐(0) 编辑
摘要: Total Accepted: 98004Total Submissions: 368319Difficulty: MediumContributors: AdminA linked list is given such that each node contains an additional random pointer which could point to any node in the... 阅读全文
posted @ 2017-02-19 22:03 copperface 阅读(312) 评论(0) 推荐(0) 编辑
摘要: 原文:https://docs.docker.com/engine/getstarted-voting-app/deploy-app/在这一步中,将会使用第一步提到的 docker-stack.yml 文件来部署 voting 应用,到我们之前创建的集群swarm中。复制 docker-stack.yml 到 manager 虚拟机docker-stack.yml 文件必须在 manager ma... 阅读全文
posted @ 2017-02-18 15:35 copperface 阅读(3231) 评论(0) 推荐(0) 编辑