### LeetCode Questions

LeetCode Questions Summary, including analysis, solution on Java & C++

5 已关注
178篇博文
• #### [LeetCode 223] Rectangle Area

Find the total area covered by two rectilinear rectangles in a 2D plane. Each rectangle is defined...

2015-09-24 03:27
2975
• #### [LeetCode 284] Peeking Iterator

Given an Iterator class interface with methods: next() and hasNext(), design and implement a Peeki...

2015-09-23 07:30
3040
• #### [LeetCode 274] H-index

Given an array of citations (each citation is a non-negative integer) of a researcher, write a funct...

2015-09-23 08:32
2642
• #### [LeetCode 275] H-Index II

Follow up for H-Index: What if the citations array is sorted in ascending order? Could you optimiz...

2015-09-23 08:48
1747
• #### [LeetCode 240] Search a 2D matrix II

Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the foll...

2015-09-23 14:10
708
• #### [LeetCode 205] Isomorphic Strings

Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the chara...

2015-09-24 02:50
1720
• #### [LeetCode 241] Different Ways to Add Parentheses

Given a string of numbers and operators, return all possible results from computing all the differen...

2015-09-18 14:42
2502
• #### [LeetCode 279] Perfect Squares

Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, ...

2015-09-18 13:11
3199
• #### [LeetCode 230] Kth Smallest Element in a BST

Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. N...

2015-09-18 12:04
1866
• #### [LeetCode 273] Integer to English Word

Convert a non-negative integer to its english words representation. Given input is guaranteed to be ...

2015-09-18 07:21
5201
• #### [LeetCode 215] Kth Largest Element in an Array

Find the kth largest element in an unsorted array. Note that it is the kth largest element in the so...

2015-09-15 14:31
528
• #### [LeetCode 166] Fraction to Recurring Decimal

Given two integers representing the numerator and denominator of a fraction, return the fraction in ...

2015-09-16 13:36
730
• #### [LeetCode 216] Combination Sum III

Find all possible combinations of k numbers that add up to a number n, given that only numbers from...

2015-09-16 15:35
2047
• #### [LeetCode 238] 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-09-17 03:57
1457
• #### [LeetCode 221] Maximal Square

Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and ret...

2015-09-17 07:27
1158
• #### [LeetCode206] Course Schedule II

There are a total of n courses you have to take, labeled from 0 to n - 1. Some courses may have...

2015-09-03 15:09
1363
• #### [LeetCode 207] Course Schedule

There are a total of n courses you have to take, labeled from 0 to n - 1. Some courses may have pr...

2015-09-03 13:47
1579
• #### [LeetCode179] Largest Number

Given a list of non negative integers, arrange them such that they form the largest number. For e...

2015-09-02 13:24
961
• #### [LeetCode202] Happy Number

Write an algorithm to determine if a number is "happy". A happy number is a number defined by the...

2015-09-02 12:36
1723
• #### [LeetCode 191] Number of 1 Bits

Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also know...

2015-09-02 12:13
1262