Given a binary tree, return the inorder traversal of its nodes' values. For example: Given binary tree [1,null,2,3], 1 \ 2 / 3 return [1,3,2]. Note: Recursive solution is triv…
Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.Note:You may assume that nums1 has enough space (size that is greater or equal to m…
Given a sorted linked list, delete all duplicates such that each element appear only once. For example, Given 1->1->2, return 1->2. Given 1->1->2->3->3, r…
题目:Given two binary strings, return their sum (also a binary string).For example,a = "11"b = "1"Return "100".这道题目是一个字符串处理人位上进行运算,不清楚Python封闭好了,实现起来会不会比较麻烦。Java这里如果可以像C/C++ 直接进…
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…
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…
由于使用了bt.cn的配置,打开404,搜索后才知道忘记配置伪静态! ...
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.…
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…
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 #…