自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

西施豆腐渣

leetcode solutions by java, c++ and python

  • 博客(13)
  • 收藏
  • 关注

原创 leetcode 163: Missing Ranges

Missing RangesTotal Accepted: 510 Total Submissions: 2300Given a sorted integer array where the range of elements are [lower, upper] inclusive, return its missing ranges.For example, giv

2014-12-31 09:09:49 6968

原创 leetcode 167: Two Sum II - Input array is sorted

Two Sum II - Input array is sortedTotal Accepted: 441 Total Submissions: 1017Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a

2014-12-31 08:27:56 9754

原创 leetcode 170: Two Sum III - Data structure design

Two Sum III - Data structure designTotal Accepted: 311 Total Submissions: 1345Design and implement a TwoSum class. It should support the following operations:add and find.add - Add the n

2014-12-31 08:17:12 9068 1

原创 leetcode 172: Factorial Trailing Zeroes

Factorial Trailing ZeroesTotal Accepted: 28 Total Submissions: 69Given an integer n, return the number of trailing zeroes in n!.Note: Your solution should be in polynomial time complexity.

2014-12-30 09:54:52 10647 1

原创 leetcode 152: Maximum Product Subarray

Maximum Product SubarrayTotal Accepted: 16617 Total Submissions: 96901Find the contiguous subarray within an array (containing at least one number) which has the largest product.For exampl

2014-12-30 09:18:02 3563

原创 leetcode 154: Find Minimum in Rotated Sorted Array II

Find Minimum in Rotated Sorted Array IITotal Accepted: 12842 Total Submissions: 42907Follow up for "Find Minimum in Rotated Sorted Array":What if duplicates are allowed?Would this affe

2014-12-30 06:41:52 537

原创 leetcode 153: Find Minimum in Rotated Sorted Array

Find Minimum in Rotated Sorted ArrayTotal Accepted: 21207 Total Submissions: 65855Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might bec

2014-12-30 04:30:30 2465

原创 leetcode 160: Intersection of Two Linked Lists

Intersection of Two Linked ListsTotal Accepted: 8676 Total Submissions: 32571Write a program to find the node at which the intersection of two singly linked lists begins.For example, the

2014-12-30 03:17:29 3864

原创 leetcode 171: Excel Sheet Column Number

Excel Sheet Column NumberTotal Accepted: 1643 Total Submissions: 3860Related to question Excel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its correspondin

2014-12-30 02:54:57 2574

原创 leetcode 155: Maximum Gap

Maximum GapTotal Accepted: 2946 Total Submissions: 12695Given an unsorted array, find the maximum difference between the successive elements in its sorted form.Try to solve it in linear ti

2014-12-28 06:57:45 2003

原创 leetcode 154: Excel Sheet Column Title

Given a positive integer, return its corresponding column title as appear in an Excel sheet.For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z 27 -> AA 28 -> AB Credits:S

2014-12-23 09:13:52 2645 1

原创 leetcode 153: Majority Element

Given an array of size n, find the majority element. The majority element is the element that appears more than⌊ n/2 ⌋ times.You may assume that the array is non-empty and the majority element alw

2014-12-23 06:06:44 1409

原创 leetcode 152: Compare Version Numbers

Compare Version NumbersTotal Accepted: 2468 Total Submissions: 17382Compare two version numbers version1 and version1.If version1 > version2 return 1, if version1 version2 return -1, other

2014-12-22 16:01:56 3163

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除