原创 2017-09-14 LeetCode_315 Count of Smaller Numbers After Self

315. Count of Smaller Numbers After Self You are given an integer array nums and you have to return a new counts arra

原创 2017-09-11 LeetCode_021 Merge Two Sorted Lists

21. Merge Two Sorted Lists Merge two sorted linked lists and return it as a new list. The new list should be made by

原创 2017-09-12 LeetCode_215 Kth Largest Element in an Array

215. Kth Largest Element in an Array Find the kth largest element in an unsorted array. Note that it is the kth large

原创 2017-09-09 LeetCode_012 Integer to Roman

12. Integer to Roman Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from

原创 2017-09-12 LeetCode_053 Maximum Subarray

53. Maximum Subarray Find the contiguous subarray within an array (containing at least one number) which has the larg

原创 2017-09-12 LeetCode_218 The Skyline Problem

218. The Skyline Problem A city's skyline is the outer contour of the silhouette formed by all the buildings in that

原创 2017-09-11 LeetCode_024 Swap Nodes in Pairs

24. Swap Nodes in Pairs Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1-

原创 2017-09-10 LeetCode_020 Valid Parentheses

20. Valid Parentheses Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if th

原创 2017-09-09 LeetCode_010 Regular Expression Matching

10. Regular Expression Matching Implement regular expression matching with support for '.' and '*'. '.' Matches any s

原创 2017-09-09 LeetCode_011 Container With Most Water

11. Container With Most Water Given n non-negative integers a1, a2, ..., an, where each represents a point at coord

原创 2017-09-10 LeetCode_019 Remove Nth Node From End of List

19. Remove Nth Node From End of List Given a linked list, remove the nth node from the end of list and return its hea

原创 2017-09-10 LeetCode_017 Letter Combinations of a Phone Number

17. Letter Combinations of a Phone Number Given a digit string, return all possible letter combinations that the numb

原创 2017-09-12 LeetCode_169 Majority Element

169. Majority Element Given an array of size n, find the majority element. The majority element is the element that a

原创 2017-09-09 LeetCode_014 Longest Common Prefix

14. Longest Common Prefix Write a function to find the longest common prefix string amongst an array of strings.

原创 2017-09-11 LeetCode_022 Generate Parentheses

22. Generate Parentheses Given n pairs of parentheses, write a function to generate all combinations of well-formed p