题目: Given a singly linked list, determine if it is a palindrome. Follow up: Could you do it in O(n) time and O(1) space? 题解: 推断一个链表是不是回文的,这里要求O(n)时间复杂 ...
分类:
编程语言 时间:
2017-05-22 17:48:12
阅读次数:
107
传送门 动归,用f[i][j]表示到达第I列高度为j时最少需要飞的次数,容易想到最裸的转移: f[i][j]=min(min(f[i-1][j-up[i-1]*k]+k),f[i-1][j+down[i-1]]) 但是会超时 考虑怎么优化k的循环,发现k可以从k-1转移过来,从图上来理解就是比如k= ...
分类:
其他好文 时间:
2017-05-22 16:41:44
阅读次数:
213
目录: 一、HTML 二、CSS 一、HTML 1、概述 HTML是英文Hyper Text Mark-up Lang(超文本标记语言)的缩写,他是一种制作万维网页面的标准语言,相当于定义统一的一套规则,大家都来遵守他,这样就可以让浏览器根据标记语言的规则去解释它 浏览器负责将标记翻译成用户看得懂的 ...
分类:
编程语言 时间:
2017-05-21 22:30:48
阅读次数:
176
1 #include 2 #include 3 #define lson l,m,rt>1; 30 build(lson); //左右递归 31 build(rson); 32 up(rt); //更新信息 33 } 34 //单点增减 35 void update(int p,int add,in... ...
分类:
其他好文 时间:
2017-05-21 11:55:42
阅读次数:
221
Problem statement: Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target n ...
分类:
其他好文 时间:
2017-05-20 21:13:19
阅读次数:
218
prop down emit up 嘿嘿 如果是第一次接触vue2.0组件传值的肯定很疑惑,这是什么意思(大神总结的,我也就是拿来用用) “down”—>指的是下的意思,即父组件向子组件传值,用props;“up”—>指的是上的意思,即子组件想父组件传值,用emit。 1.子组件向父组件的传值: C ...
分类:
其他好文 时间:
2017-05-20 17:15:27
阅读次数:
580
然后自己可用timer或者Thread去控制轮播,轮播中控制tvNotice的代码如下 slide_in_bottom.xml slide_out_up.xml <!-- Baidu Button BEGIN --> <!-- Baidu Button END --> <!--172.16.140. ...
分类:
其他好文 时间:
2017-05-20 14:27:30
阅读次数:
193
今天整理了一些webstorm比较实用的快捷键:Ctrl+/ 或 Ctrl+Shift+/ 注释(// 或者/*…*/ )Shift+F6 重构-重命名Ctrl+X 删除行Ctrl+D 复制行Ctrl+G 查找行Ctrl+Shift+Up/Down 代码向上/下移动。F2 或Shift+F2 高亮错 ...
分类:
Web程序 时间:
2017-05-20 12:22:51
阅读次数:
208
【环上移动】: 说明: dn:下限,up:上限,s:起点,d:步长(正数为前进,负数为后退)。 L:区间长度。 ...
分类:
其他好文 时间:
2017-05-20 12:16:09
阅读次数:
122
Problem statement: Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each ...
分类:
其他好文 时间:
2017-05-20 11:10:31
阅读次数:
232