LeetCode: 66. Plus One
Given a non-negative integer represented as a non-empty array of digits, plus one to the integer. You may assume the integer do not contain any leading zero, except the number…
LeetCode:58 Length of Last Word
Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the last word does not exist, return 0…
LeetCode:38.Count and Say
Count and SayThe count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, …1 is read off as one 1 or 11.11 is read off as two 1s or 21.…
LeetCode:35. Search Insert Position
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order. You may assume no du…
Ubuntu 16.04 apt-get更换为国内阿里云源
1,备份系统默认的源(没有root权限的前面加sudo)cp /etc/apt/sources.list /etc/apt/sources.list.bak2,修改/etc/apt/sources.list>/etc/apt/sources.list cat >>/etc/apt/sources.list<<EOF #…
LeetCode:27. Remove Element
Given an array and a value, remove all instances of that value in place and return the new length. Do not allocate extra space for another array, you must do this in place wit…
RecyclerView Item 布局宽高无效问题探究
前言 这个问题很早之前就碰到过,后来通过google找到了解决办法,也就没有去管它了,直到最近有朋友问到这个问题,感觉很熟悉却又说不出具体原因,因此,就想通过源码分析一下。顺便做个总结,避免以后出现类似的问题。  问题复现 为什么发现了这个问题呢?是当时要写一个列表,列表本来很简单,一行显示一个文本,实现起来也很容易,一个Recycler…