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…
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 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…
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra space for another array, you must…