- 博客(15)
- 收藏
- 关注
原创 leetcode 287: Find the Duplicate Number
Find the Duplicate NumberTotal Accepted: 1340 Total Submissions: 4766 Difficulty: HardGiven an array nums containing n + 1 integers where each integer is between 1 andn (incl
2015-09-29 08:29:12 8654 6
原创 leetcode 243: Shortest Word Distance
Shortest Word DistanceTotal Accepted: 1754 Total Submissions: 4239 Difficulty: EasyGiven a list of words and two words word1 and word2, return the shortest distance between these two
2015-09-27 15:15:26 5241
原创 leetcode 272: Closest Binary Search Tree Value II
Closest Binary Search Tree Value IITotal Accepted: 984 Total Submissions: 3704 Difficulty: HardGiven a non-empty binary search tree and a target value, find k values in the BST tha
2015-09-26 18:09:09 6407
原创 leetcode 270: Closest Binary Search Tree Value
Closest Binary Search Tree ValueTotal Accepted: 1815 Total Submissions: 6418 Difficulty: EasyGiven a non-empty binary search tree and a target value, find the value in the BST that
2015-09-26 09:43:21 7470
原创 leetcode 277: Find the Celebrity
Find the CelebrityTotal Accepted: 1126 Total Submissions: 3603 Difficulty: MediumSuppose you are at a party with n people (labeled from 0 ton - 1) and among them, there may exist
2015-09-26 09:04:47 6492
原创 leetcode 281: Zigzag Iterator
Zigzag IteratorTotal Accepted: 964 Total Submissions: 2714 Difficulty: MediumGiven two 1d vectors, implement an iterator to return their elements alternately.For example, given t
2015-09-26 08:32:15 6212
原创 leetcode 280: Wiggle Sort
Wiggle SortTotal Accepted: 1291 Total Submissions: 3008 Difficulty: MediumGiven an unsorted array nums, reorder it in-place such thatnums[0] = nums[2] .For example, given nums
2015-09-26 07:44:26 7965 5
原创 leetcode 286: Walls and Gates
Walls and GatesTotal Accepted: 411 Total Submissions: 1365 Difficulty: MediumYou are given a m x n 2D grid initialized with these three possible values.-1 - A wall or an obstac
2015-09-26 06:09:33 6897
原创 leetcode 284: Peeking Iterator
Peeking IteratorTotal Accepted: 2156 Total Submissions: 6859 Difficulty: MediumGiven an Iterator class interface with methods: next() and hasNext(), design and implement a Peekin
2015-09-24 02:18:04 4950
原创 leetcode 283: Move Zeroes
Move ZeroesTotal Accepted: 858 Total Submissions: 1878 Difficulty: EasyGiven an array nums, write a function to move all 0's to the end of it while maintaining the relative order o
2015-09-19 13:32:31 8452
原创 leetcode 279: Perfect Squares
Perfect SquaresTotal Accepted: 605 Total Submissions: 1956 Given a positive integer n, find the least number of perfect square numbers (for example,1, 4, 9, 16, ...) which su
2015-09-10 06:03:01 9216
原创 leetcode 268: Missing Number
Missing NumberTotal Accepted: 10033 Total Submissions: 31720Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array.For e
2015-09-08 09:19:12 2849
原创 leetcode 278: First Bad Version
First Bad VersionTotal Accepted: 1415 Total Submissions: 5826You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your
2015-09-08 08:49:49 5094 3
原创 leetcode 275: H-Index II
Follow up for H-Index: What if the citations array is sorted in ascending order? Could you optimize your algorithm?[思路]二分查找, [CODE]public class Solution { public int hIndex(int[]
2015-09-05 17:09:29 3178
原创 leetcode 274: H-Index
H-IndexTotal Accepted: 2684 Total Submissions: 11955Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researche
2015-09-05 16:30:51 4158
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人