原创 leetcode 36: Valid Sudoku

問題描述: Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules. The Sudoku board could be partially

原创 leetcode 111: Minimum Depth of Binary Tree

問題描述: Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path

原创 leetcode 19: Remove Nth Node From End of List

問題描述: Given a linked list, remove the nth node from the end of list and return its head. For example, Given linked

原创 leetcode 118: Pascal's Triangle

問題描述: Given numRows, generate the first numRows of Pascal’s triangle. For example, given numRows = 5, Return [

原创 leetcode 290: Word Pattern

問題描述: Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such

原创 leetcode 66: Plus One

問題描述: Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored

原创 leetcode 160:Intersection of Two Linked Lists

問題描述: Write a program to find the node at which the intersection of two singly linked lists begins. 思路: 題目說O(n)時間解決

原创 leetcode 328 Odd Even Linked List

問題描述: Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are

原创 leetcode 198: House Robber

問題描述: You are a professional robber planning to rob houses along a street. Each house has a certain amount of money

原创 leetcode 219: Contains Duplicate II

問題描述: Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the a

原创 leetcode 38:count and say

問題描述: The count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, … 1 is

原创 leetcode 205 : Isomorphic Strings

問題描述: Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the characters in

原创 leetcode 172: Factorial Trailing Zeroes

問題描述: Given an integer n, return the number of trailing zeroes in n!. Note: Your solution should be in logarithmic

原创 leetcode 107: Binary Tree Level Order Traversal II

問題描述: Given a binary tree, return the bottom-up level order traversal of its nodes’ values. (ie, from left to right

原创 leetcode 101: Symmetric Tree

問題描述: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, t