自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 收藏
  • 关注

原创 209. Minimum Size Subarray Sum【leetcode解题报告】

DescriptionGiven an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of which the sum ≥ s. If there isn’t one, return 0 instead.For example, ...

2018-04-30 19:14:30 182

原创 81. Search in Rotated Sorted Array II【leetcode解题报告】

DescriptionSuppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e., [0,0,1,2,2,5,6] might become [2,5,6,0,0,1,2]).You are given a target value to sear...

2018-04-30 17:07:23 194

原创 33. Search in Rotated Sorted Array【leetcode解题报告】

DescriptionSuppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]).You are given a target value to sear...

2018-04-30 17:06:57 339

原创 367. Valid Perfect Square【leetcode解题报告】

题目Given a positive integer num, write a function which returns True if num is a perfect square else False.Note: Do not use any built-in library function such as sqrt.Example 1:Input: 16Retu...

2018-04-30 15:08:45 118

原创 69. Sqrt(x)【leetcode解题报告】

descriptionImplement int sqrt(int x).Compute and return the square root of x, where x is guaranteed to be a non-negative integer.Since the return type is an integer, the decimal digits are trunc...

2018-04-30 11:18:08 165

原创 378. Kth Smallest Element in a Sorted Matrix【leetcode解题报告】

题目Given a n x n matrix where each of the rows and columns are sorted in ascending order, find the kth smallest element in the matrix.Note that it is the kth smallest element in the sorted order, n...

2018-04-28 22:32:14 174

原创 347. Top K Frequent Elements【leetcode解题报告】

题目Given a non-empty array of integers, return the k most frequent elements.For example, Given [1,1,1,2,2,3] and k = 2, return [1,2].Note: You may assume k is always valid, 1 ≤ k ≤ number of u...

2018-04-28 22:02:39 122

原创 215. Kth Largest Element in an Array 【leetcode解题报告】

题目: Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element. For example, Given [3,2,1,5,6,4] and k = 2, ...

2018-04-28 20:22:39 176

原创 【算法导论】第六章 堆 学习笔记

堆二叉堆是一个数组,可以看做一个近似完全二叉树,对于一个长度为nnn的数组给定一个数组下标i, i=0,1,2,…,n−1i, i=0,1,2,…,n−1i,~i=0,1,2,…,n-1,则: parent(i)=i/2取下界left(i)=i∗2+1right(i)=i∗2+2parent(i)=i/2取下界left(i)=i∗2+1right(i)=i∗2+2par...

2018-04-27 10:38:04 202

原创 4. Median of Two Sorted Arrays【Hard】

leetcode Median of Two Sorted Arrays hard

2018-04-21 18:30:21 135

空空如也

空空如也

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

TA关注的人

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