摘要:
Given two binary strings, return their sum (also a binary string). Example a = 11 b = 1 Return 100 分析: 这个和10进制加法一样。 total = a + b + carryover; digit = 阅读全文
摘要:
Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant digit is a 阅读全文
摘要:
Given two array of integers(the first array is array A, the second array is arrayB), now we are going to find a element in array A which is A[i], and 阅读全文
摘要:
Write a method to replace all spaces in a string with %20. The string is given in a characters array, you can assume it has enough space for replaceme 阅读全文
摘要:
Invert a binary tree. Invert a binary tree. Invert a binary tree. Example 1 1 / \ / \ 2 3 => 3 2 / \ 4 4 1 /** 2 * Definition of TreeNode: 3 * public 阅读全文
摘要:
Implement int sqrt(int x). Compute and return the square root of x. Have you met this question in a real interview? Yes Example sqrt(3) = 1 sqrt(4) = 阅读全文
摘要:
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. Notice Bonus point if you 阅读全文
摘要:
Given a dictionary, find all of the longest words in the dictionary. Given a dictionary, find all of the longest words in the dictionary. Given a dict 阅读全文
摘要:
Given an integer array, heapify it into a min-heap array. For a heap array A, A[0] is the root of heap, and for each A[i], A[i * 2 + 1] is the left ch 阅读全文
摘要:
Coins in a Line I There are n coins in a line. Two players take turns to take one or two coins from right side until there are no more coins left. The 阅读全文