Given a linked list, remove the nth node from the end of list and return its head. For example, 题意:给出一个链表,删除倒数第n个节点 刚在书上见过这个题,思路是用双指针,p1,p2,先让p2走n步,然后 ...
分类:
其他好文 时间:
2016-12-23 19:09:58
阅读次数:
178
体验效果:http://hovertree.com/texiao/css3/39/这是一个使用纯CSS3实现的图文切换效果,没使用js脚本。点击左右箭头或者索圆点引按钮可以切换内容。本特效中使用到了CSS3的新选择器 nth-of-type(n),:nth-of-type(n) 选择器匹配属于父元素 ...
分类:
Web程序 时间:
2016-12-23 14:17:46
阅读次数:
271
在伪类方法里面,有一个:nth-child()的方法,当()里面的参数为2n的时候表示偶数行,当()里面的参数为2n+1或者2n-1的时候表示奇数行 后面的参数为数字的时候,表示的选择的哪一行 实例: ...
分类:
其他好文 时间:
2016-12-20 00:28:55
阅读次数:
162
Binary Search My solution: Be careful in my binary search function, l, r may go out of the range of the array Solution with the highest vote: ...
分类:
其他好文 时间:
2016-12-19 14:22:17
阅读次数:
252
(1)Remove Nth Node From End of List 解题思路: 题目要求只使用一次遍历。可以使用指针来完成单程解决方案。快速移动一个指针向前移动n + 1个位置,以保持两个指针之间的间隙,然后以相同的速度移动两个指针。 最后,当快速指针到达结束时,慢指针将在n + 1个位置后面 ...
分类:
其他好文 时间:
2016-12-18 12:13:52
阅读次数:
226
Analysis: Solution 1: The greedy algorithm is that in each step, select the char with highest remaining count if possible (if it is not in the waiting ...
分类:
其他好文 时间:
2016-12-16 11:58:23
阅读次数:
263
E[foo^="bar"] 匹配foo属性值以"bar"开始的E元素 E[foo$="bar"] 匹配foo属性值以"bar"结束的E元素 E[foo*="bar"] 匹配foo属性值包含"bar"的E元素 E:nth-child(n) 匹配元素类型为E且是父元素的第n个子元素 E:nth-last... ...
分类:
其他好文 时间:
2016-12-15 13:57:44
阅读次数:
204
#Author:xuhan#-*-coding:utf-8-*-shopping_car=[]whileTrue:salary=input(‘[q=quit]请输入您的购物预算:‘)ifsalary.isdigit():breakelse:continueprint(‘欢迎光临家乐福购物中心‘.center(60,‘-‘))product_list=[(‘Iphone7‘,5999),(‘MacAre‘,6999),(‘UNIQL‘,200)]choice_flag=‘..
分类:
编程语言 时间:
2016-12-13 16:46:45
阅读次数:
301
题目要求: 定义一个二维数组保存 10个学生的5门课成绩,分别用函数实现:(1)input():输入每个学生的成绩;(2)output():输出每个学生的成绩;(3)aver_stu():计算并输出每个学生的平均分;(4)aver_cour():计算并输出每门课的平均分;(5)highest():找 ...
分类:
编程语言 时间:
2016-12-11 02:20:02
阅读次数:
163
Tech companies dominate Glassdoor’s ranking of the highest paying companies in the U.S., snagging 20 of the top 25 spots. But no tech company ranks hi ...
分类:
其他好文 时间:
2016-12-08 07:43:23
阅读次数:
195