伪程序员的世界

Debug myself and debug the world!


  • 首页

  • 归档

  • 分类

  • 标签

  • 搜索

LeetCode 42. Trapping Rain Water

发表于 2018-02-23 | 分类于 算法 , LeetCode
字数统计: 3k | 阅读时长≈ 0:03

LeetCode 42. Trapping Rain Water

Description:

Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.

阅读全文 »

LeetCode 41. First Missing Positive

发表于 2018-02-08 | 分类于 算法 , LeetCode
字数统计: 2.2k | 阅读时长≈ 0:02

LeetCode 41. First Missing Positive

Description:

Given an unsorted integer array, find the first missing positive integer.
Your algorithm should run in O(n) time and uses constant space.

阅读全文 »

LeetCode 39. Combination Sum

发表于 2018-02-08 | 分类于 算法 , LeetCode
字数统计: 3.7k | 阅读时长≈ 0:04

LeetCode 39. Combination Sum

Description:

Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.

The same repeated number may be chosen from C unlimited number of times.

Note:
All numbers (including target) will be positive integers.
The solution set must not contain duplicate combinations.

阅读全文 »

LeetCode 34. Search for a Range

发表于 2018-02-08 | 分类于 算法 , LeetCode
字数统计: 2.8k | 阅读时长≈ 0:03

LeetCode 34. Search for a Range

Description:

Given an array of integers sorted in ascending order, find the starting and ending position of a given target value.

Your algorithm’s runtime complexity must be in the order of O(log n).

If the target is not found in the array, return [-1, -1].

Example:

Given [5, 7, 7, 8, 8, 10] and target value 8,
return [3, 4].

阅读全文 »

LeetCode 33. Search in Rotated Sorted Array

发表于 2018-02-07 | 分类于 算法 , LeetCode
字数统计: 2.5k | 阅读时长≈ 0:02

LeetCode 33. Search in Rotated Sorted Array

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 search. If found in the array return its index, otherwise return -1.

You may assume no duplicate exists in the array.

阅读全文 »

LeetCode 31.NextPermutation

发表于 2018-02-07 | 分类于 算法 , LeetCode
字数统计: 2.3k | 阅读时长≈ 0:02

LeetCode 31.NextPermutation

Description:

Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.

If such arrangement is not possible, it must rearrange it as the lowest possible order (ie, sorted in ascending order).

The replacement must be in-place, do not allocate extra memory.

阅读全文 »

VSCode配置LaTeX Workstation以支持中文

发表于 2018-02-02 | 分类于 程序人生
字数统计: 1.6k | 阅读时长≈ 0:02

前言:

一直以来都羡慕着LaTeX的强大排版功能,这次在为美赛做准备时,发现VSCode也可以配置LaTeX(不得不说微软还是很牛逼的),所以有了这篇小文章。

阅读全文 »

LeetCode 18. 4Sum

发表于 2018-01-31 | 分类于 算法 , LeetCode
字数统计: 2.6k | 阅读时长≈ 0:03

LeetCode 18. 4Sum

Description:

Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target.

Note: The solution set must not contain duplicate quadruplets.

阅读全文 »

LeetCode 16. 3Sum Closest

发表于 2018-01-31 | 分类于 算法 , LeetCode
字数统计: 1.3k | 阅读时长≈ 0:01

LeetCode 16. 3Sum Closest

Description:

Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exactly one solution.

阅读全文 »

LeetCode 15. 3Sum

发表于 2018-01-31 | 分类于 算法 , LeetCode
字数统计: 2.1k | 阅读时长≈ 0:02

LeetCode 15. 3Sum

Description:

Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.

Note: The solution set must not contain duplicate triplets.

阅读全文 »
1234…11
linjiafengyang

linjiafengyang

Debug myself and debug the world!

106 日志
7 分类
3 标签
GitHub CSDN
© 2019 linjiafengyang | 394k | 6:34