### 小题大做——Leetcode算法

12 已关注
239篇博文
• #### Leetcode 300. Longest Increasing Subsequence

Given an unsorted array of integers, find the length of longest increasing subsequence. For examp...

2017-04-20 09:32
893
• #### Leetcode 299. Bulls and Cows

You are playing the following Bulls and Cows game with your friend: You write down a number and ask ...

2017-04-19 17:12
925
• #### Leetcode 297. Serialize and Deserialize Binary Tree

Serialization is the process of converting a data structure or object into a sequence of bits so tha...

2017-04-19 16:50
804
• #### Leetcode 295. Find Median from Data Stream

Median is the middle value in an ordered integer list. If the size of the list is even, there is no ...

2017-04-19 11:25
818
• #### Leetcode 292. Nim Game

You are playing the following Nim Game with your friend: There is a heap of stones on the table, eac...

2017-04-18 17:47
785
• #### Leetcode 290. Word Pattern

Given a pattern and a string str, find if str follows the same pattern. Here follow means a ful...

2017-04-18 17:33
854
• #### Leetcode 289. Game of Life

According to the Wikipedia's article: "The Game of Life, also known simply as Life, is a cellular ...

2017-04-18 11:35
758
• #### Leetcode 287. Find the Duplicate Number

Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), pro...

2017-04-17 20:18
930
• #### Leetcode 284. Peeking Iterator

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

2017-04-17 17:49
815
• #### Leetcode 283. Move Zeroes

Given an array nums, write a function to move all 0's to the end of it while maintaining the relat...

2017-04-17 17:31
814
• #### Leetcode 282. Expression Add Operators

Given a string that contains only digits 0-9 and a target value, return all possibilities to add b...

2017-04-17 17:16
761
• #### Leetcode 279. Perfect Squares

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

2017-04-16 21:18
863
• #### Leetcode 278. First Bad Version

You are a product manager and currently leading a team to develop a new product. Unfortunately, the ...

2017-04-16 20:53
717
• #### Leetcode 275. H-Index II

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

2017-04-16 20:04
731
• #### Leetcode 274. H-Index

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

2017-04-16 19:02
740
• #### Leetcode 268. Missing Number

Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is miss...

2017-04-15 14:56
789
• #### Leetcode 264. Ugly Number II

Write a program to find the n-th ugly number. Ugly numbers are positive numbers whose prime facto...

2017-04-15 14:48
879
• #### Leetcode 263. Ugly Number

Write a program to check whether a given number is an ugly number. Ugly numbers are positive numb...

2017-04-15 14:24
826
• #### Leetcode 258. Add Digits

Given a non-negative integer num, repeatedly add all its digits until the result has only one digi...

2017-04-15 14:03
701
• #### Leetcode 257. Binary Tree Paths

Given a binary tree, return all root-to-leaf paths. For example, given the following binary tree:...

2017-04-15 13:50
657