
c++
文章平均质量分 61
女侠楚楚楚
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
69. Sqrt(x)【leetcode解题报告】
description Implement 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 · 199 阅读 · 0 评论 -
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 · 150 阅读 · 0 评论 -
264. Ugly Number II【 leetcode解题报告】
Description Write a program to find the n-th ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 1, 2, 3, 4, 5, 6, 8, 9, 10, 12 is the sequence of t...原创 2018-05-07 14:27:39 · 258 阅读 · 0 评论 -
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 · 209 阅读 · 0 评论 -
4. Median of Two Sorted Arrays【Hard】
leetcode Median of Two Sorted Arrays hard原创 2018-04-21 18:30:21 · 168 阅读 · 0 评论 -
Single Number Ⅰ Ⅱ III【 leetcode解题报告】
136. Single Number Ⅰ Description Given a non-empty array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexi...原创 2018-05-01 14:48:43 · 512 阅读 · 0 评论 -
209. Minimum Size Subarray Sum【leetcode解题报告】
Description Given 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 · 222 阅读 · 0 评论 -
81. Search in Rotated Sorted Array II【leetcode解题报告】
Description Suppose 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 · 228 阅读 · 0 评论 -
33. Search in Rotated Sorted Array【leetcode解题报告】
Description Suppose 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 · 396 阅读 · 0 评论 -
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: 16 Retu...原创 2018-04-30 15:08:45 · 151 阅读 · 0 评论 -
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 · 206 阅读 · 0 评论