随笔分类 - Level 1
摘要:The code base version is an integer start from 1 to n. One day, someone committed a bad version in the code case, so it caused this version and the fo
阅读全文
摘要:Add Two Numbers I You have two numbers represented by a linked list, where each node contains a single digit. The digits are stored in reverse order,
阅读全文
摘要:Given n pieces of wood with length L[i] (integer array). Cut them into small pieces to guarantee you could have equal or more than k pieces with the s
阅读全文
摘要:Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longes
阅读全文
摘要:Count how many 1 in binary representation of a 32-bit integer. Count how many 1 in binary representation of a 32-bit integer. Count how many 1 in bina
阅读全文
摘要: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
阅读全文
摘要:Check if two binary trees are identical. Identical means the two binary trees have the same structure and every identical position has the same value.
阅读全文
摘要:Factory is a design pattern in common usage. Implement a ShapeFactory that can generate correct shape. You can assume that we have only tree different
阅读全文
摘要:Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. Notice You must
阅读全文
摘要: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
阅读全文
摘要: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 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
阅读全文
摘要:Implement a stack with min() function, which will return the smallest number in the stack. It should support push, pop and min operation all in O(1) c
阅读全文
摘要:Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.
阅读全文
摘要:Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). Example Given binary tree {3,9,2
阅读全文
摘要:Compare two strings A and B, determine whether A contains all of the characters in B. The characters in string A and B are all Upper Case letters. Not
阅读全文
摘要:Given a string and an offset, rotate string by offset. (rotate from left to right) Given a string and an offset, rotate string by offset. (rotate from
阅读全文
摘要:Unique Paths I A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or
阅读全文
摘要:Count the number of k's between 0 and n. k can be 0 - 9. Count the number of k's between 0 and n. k can be 0 - 9. Count the number of k's between 0 an
阅读全文

浙公网安备 33010602011771号