LeetCode Count and Say The 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. 21 is read off as "one 2, then one 1" or 1211. Given an... Read More

# Monthly Archives: May 2016

# LeetCode Valid Sudoku

LeetCode Valid Sudoku Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules. The Sudoku board could be partially filled, where empty cells are filled with the character '.'. A partially filled sudoku which is valid. Note: A valid... Read More

# LeetCode Implement strStr()

LeetCode Implement strStr() Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. 串的模式匹配问题，首先献上暴力方法： class Solution { public: int... Read More

# LeetCode Divide Two Integers

LeetCode Divide Two Integers Divide two integers without using multiplication, division and mod operator. If it is overflow, return... Read More

# LeetCode Remove Element

LeetCode 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 with constant memory. The order of elements can be... Read More