原创 LeetCode - Merge Two Sorted Lists

Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes o

原创 LeetCode - 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, level by

原创 LeetCode - Pascal's Triangle

Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5, Return [ [1],

原创 LeetCode - Integer to Roman

Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. http://oj.l

原创 LeetCode - Remove Element

Given an array and a value, remove all instances of that value in place and return the new length. The order of element

原创 LeetCode - Single Number II

Given an array of integers, every element appears three times except for one. Find that single one. Note: Your algorit

原创 LeetCode - Roman to Integer

Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. http://oj.l

原创 LeetCode - Maximum Subarray

Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, g

原创 LeetCode - Binary Tree Preorder Traversal

Given a binary tree, return the preorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3},

原创 LeetCode - Remove Duplicates from Sorted Array

Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.

原创 LeetCode - Convert Sorted Array to Binary Search Tree

Given an array where elements are sorted in ascending order, convert it to a height balanced BST. http://oj.leetcode.co

原创 LeetCode - Binary Tree Inorder Traversal

Given a binary tree, return the inorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3}, 1