标签: LeetCode

9 篇文章

LeetCode:94. Binary Tree Inorder Traversal
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…
LeetCode:88. Merge Sorted Array
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…
LeetCode:67. Add Binary
题目:Given two binary strings, return their sum (also a binary string).For example,a = "11"b = "1"Return "100".这道题目是一个字符串处理人位上进行运算,不清楚Python封闭好了,实现起来会不会比较麻烦。Java这里如果可以像C/C++ 直接进…
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: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…