摘要: 给定一个单链表,把所有的奇数节点和偶数节点分别排在一起。请注意,这里的奇数节点和偶数节点指的是节点编号的奇偶性,而不是节点的值的奇偶性。请尝试使用原地算法完成。你的算法的空间复杂度应为 O(1),时间复杂度应为 O(nodes),nodes 为节点总数。示例 1:输入... 阅读全文
posted @ 2018-11-22 23:01 strawqqhat 阅读(119) 评论(0) 推荐(0)
摘要: 删除链表中等于给定值 val 的所有节点。示例:输入: 1->2->6->3->4->5->6, val = 6输出: 1->2->3->4->5/** * Definition for singly-linked list. * public class ListN... 阅读全文
posted @ 2018-11-22 22:43 strawqqhat 阅读(87) 评论(0) 推荐(0)
摘要: 反转一个单链表。示例:输入: 1->2->3->4->5->NULL输出: 5->4->3->2->1->NULL进阶:你可以迭代或递归地反转链表。你能否用两种方法解决这道题?递归:/** * Definition for singly-linked list. * ... 阅读全文
posted @ 2018-11-22 22:31 strawqqhat 阅读(95) 评论(0) 推荐(0)
摘要: 给定一个链表,删除链表的倒数第 n 个节点,并且返回链表的头结点。示例:给定一个链表: 1->2->3->4->5, 和 n = 2.当删除了倒数第二个节点后,链表变为 1->2->3->5.说明:给定的 n 保证是有效的。进阶:你能尝试使用一趟扫描实现吗?/** *... 阅读全文
posted @ 2018-11-22 22:13 strawqqhat 阅读(125) 评论(0) 推荐(0)
摘要: 编写一个程序,找到两个单链表相交的起始节点。 例如,下面的两个链表:A: a1 → a2 ↘ c1 → c2 → c3 ↗ ... 阅读全文
posted @ 2018-11-22 14:38 strawqqhat 阅读(108) 评论(0) 推荐(0)
摘要: 颜色值在网页中的颜色设置是非常重要,有字体颜色(color)、背景颜色(background-color)、边框颜色(border)等,设置颜色的方法也有很多种:1、英文命令颜色前面几个小节中经常用到的就是这种设置方法:p{color:red;}2、RGB颜色这个与 ... 阅读全文
posted @ 2018-11-22 14:20 strawqqhat 阅读(107) 评论(0) 推荐(0)
摘要: 目录 水平居中设置-行内元素水平居中设置-定宽块状元素水平居中总结-不定宽块状元素方法(一)水平居中总结-不定宽块状元素方法(二)水平居中总结-不定宽块状元素方法(三)垂直居中-父元素高度确定的单行文本垂直居中-父元素高度确定的多行文本(方法一)垂直居中-父元素高度确... 阅读全文
posted @ 2018-11-22 14:19 strawqqhat 阅读(146) 评论(0) 推荐(0)
摘要: 给定一个链表,返回链表开始入环的第一个节点。 如果链表无环,则返回 null。说明:不允许修改给定的链表。进阶:你是否可以不用额外空间解决此题?/** * Definition for singly-linked list. * class ListNode { * ... 阅读全文
posted @ 2018-11-22 14:19 strawqqhat 阅读(72) 评论(0) 推荐(0)
摘要: 给定一个链表,判断链表中是否有环。进阶:你能否不使用额外空间解决此题?/** * Definition for singly-linked list. * class ListNode { * int val; * ListNode next; * ... 阅读全文
posted @ 2018-11-22 14:02 strawqqhat 阅读(84) 评论(0) 推荐(0)
#home h1{ font-size:45px; } body{ background-image: url("放你的背景图链接"); background-position: initial; background-size: cover; background-repeat: no-repeat; background-attachment: fixed; background-origin: initial; background-clip: initial; height:100%; width:100%; } #home{ opacity:0.7; } .wall{ position: fixed; top: 0; left: 0; bottom: 0; right: 0; } div#midground{ background: url("https://i.postimg.cc/PP5GtGtM/midground.png"); z-index: -1; -webkit-animation: cc 200s linear infinite; -moz-animation: cc 200s linear infinite; -o-animation: cc 200s linear infinite; animation: cc 200s linear infinite; } div#foreground{ background: url("https://i.postimg.cc/z3jZZD1B/foreground.png"); z-index: -2; -webkit-animation: cc 253s linear infinite; -o-animation: cc 253s linear infinite; -moz-animation: cc 253s linear infinite; animation: cc 253s linear infinite; } div#top{ background: url("https://i.postimg.cc/PP5GtGtM/midground.png"); z-index: -4; -webkit-animation: da 200s linear infinite; -o-animation: da 200s linear infinite; animation: da 200s linear infinite; } @-webkit-keyframes cc { from{ background-position: 0 0; transform: translateY(10px); } to{ background-position: 600% 0; } } @-o-keyframes cc { from{ background-position: 0 0; transform: translateY(10px); } to{ background-position: 600% 0; } } @-moz-keyframes cc { from{ background-position: 0 0; transform: translateY(10px); } to{ background-position: 600% 0; } } @keyframes cc { 0%{ background-position: 0 0; } 100%{ background-position: 600% 0; } } @keyframes da { 0%{ background-position: 0 0; } 100%{ background-position: 0 600%; } } @-webkit-keyframes da { 0%{ background-position: 0 0; } 100%{ background-position: 0 600%; } } @-moz-keyframes da { 0%{ background-position: 0 0; } 100%{ background-position: 0 600%; } } @-ms-keyframes da { 0%{ background-position: 0 0; } 100%{ background-position: 0 600%; } }