### Enjoy LeetCode

LeetCode刷题记录,和大家一起学习,一起进步!

0 已关注
104篇博文
• #### [LeetCode] Count Numbers with Unique Digits

Given a non-negative integer n, count all numbers with unique digits, x, where 0 ≤ x < 10n.Example: ...

2016-06-19 13:05
2318

Design a simplified version of Twitter where users can post tweets, follow/unfollow another user and...

2016-06-19 12:35
1237
• #### [LeetCode] Intersection of Two Arrays II

Given two arrays, write a function to compute their intersection.Example: Given nums1 = [1, 2, 2, 1...

2016-05-21 15:04
4234
• #### [LeetCode] Intersection of Two Arrays

Given two arrays, write a function to compute their intersection.Example: Given nums1 = [1, 2, 2, 1...

2016-05-19 10:43
1062
• #### [LeetCode] Self Crossing

You are given an array x of n positive numbers. You start at point (0,0) and moves x[0] metres to th...

2016-05-16 21:47
3827
• #### [LeetCode] Palindrome Pairs

Given a list of unique words. Find all pairs of distinct indices (i, j) in the given list, so that t...

2016-05-16 13:57
2595
• #### [LeetCode] Counting Bits

Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the ...

2016-05-16 11:21
3619
• #### [LeetCode] Flatten Nested List Iterator

Given a nested list of integers, implement an iterator to flatten it.Each element is either an integ...

2016-05-16 10:54
3726
• #### [LeetCode] Power of Four

Given an integer (signed 32 bits), write a function to check whether it is a power of 4.Example: Gi...

2016-05-16 10:22
3194
• #### [LeetCode] Integer Break

Given a positive integer n, break it into the sum of at least two positive integers and maximize the...

2016-05-15 22:09
3641
• #### [LeetCode] Reverse Vowels of a String

Write a function that takes a string as input and reverse only the vowels of a string.Example 1: Gi...

2016-05-15 11:30
3714
• #### [LeetCode] Top K Frequent Elements

Given a non-empty array of integers, return the k most frequent elements.For example, Given [1,1,1,...

2016-05-15 10:59
3835
• #### [LeetCode] Increasing Triplet Subsequence

Given an unsorted array return whether an increasing subsequence of length 3 exists or not in the ar...

2016-02-16 21:39
3166
• #### [LeetCode] Power of Three | Power of Two

Given an integer, write a function to determine if it is a power of three.Follow up: Could you do i...

2016-01-28 21:39
1675
• #### [LeetCode] Longest Increasing Path in a Matrix

Given an integer matrix, find the length of the longest increasing path.From each cell, you can eith...

2016-01-28 20:49
2529
• #### [LeetCode] Patching Array

Given a sorted positive integer array nums and an integer n, add/patch elements to the array such th...

2016-01-28 17:27
2404
• #### [LeetCode] Odd Even Linked List

Given a singly linked list, group all odd nodes together followed by the even nodes. Please note her...

2016-01-28 16:05
1281
• #### [LeetCode] Delete Node in a Linked List

Write a function to delete a node (except the tail) in a singly linked list, given only access to th...

2015-11-11 19:04
1414
• #### [LeetCode] Product of Array Except Self

Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal ...

2015-11-10 17:26
653
• #### [LeetCode] Sliding Window Maximum

Given an array nums, there is a sliding window of size k which is moving from the very left of the a...

2015-11-10 16:45
800