原创 leetcode[20]:Valid Parentheses
Valid Parentheses Given a string containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[’ and ‘]’, determine if the i
原创 leetcode[136]:Single Number
Single Number Given an array of integers, every element appears twice except for one. Find that single one. Note:
原创 leetcode[14]:Longest Common Prefix
Longest Common Prefix Write a function to find the longest common prefix string amongst an array of strings. char*
原创 leetcode[102]:Binary Tree Level Order Traversal
Binary Tree Level Order Traversal Given a binary tree, return the level order traversal of its nodes’ values. (ie,
原创 leetcode[145]:Binary Tree Postorder Traversal
Binary Tree Postorder Traversal Given a binary tree, return the postorder traversal of its nodes’ values. For exa
原创 leetcode[8]:String to Integer (atoi)
String to Integer (atoi) Implement atoi to convert a string to an integer. Hint: Carefully consider all possible i
原创 leetcode[237]:Delete Node in a Linked List
Delete Node in a Linked List Write a function to delete a node (except the tail) in a singly linked list, given on
原创 leetcode[94]:Binary Tree Inorder Traversal
Binary Tree Inorder Traversal Given a binary tree, return the inorder traversal of its nodes’ values. For example:
原创 leetcode[118]:Pascal's Triangle
Pascal’s Triangle Given numRows, generate the first numRows of Pascal’s triangle. For example, given numRows = 5,
原创 leetcode[125]:Valid Palindrome
Valid Palindrome Given a string, determine if it is a palindrome, considering only alphanumeric characters and igno
原创 leetcode[235]:Lowest Common Ancestor of a Binary Search Tree
Lowest Common Ancestor of a Binary Search Tree Given a binary search tree (BST), find the lowest common ancestor (
原创 leetcode[38]:Count and Say
Count and Say The count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221
原创 leetcode[234]:Palindrome Linked List
Palindrome Linked List Given a singly linked list, determine if it is a palindrome. Follow up: Could you do it in
原创 leetcode[144]:Binary Tree Preorder Traversal
Binary Tree Preorder Traversal Given a binary tree, return the preorder traversal of its nodes’ values. For example
原创 leetcode[107]:Binary Tree Level Order Traversal II
Binary Tree Level Order Traversal II Given a binary tree, return the bottom-up level order traversal of its nodes’