伪程序员的世界

Debug myself and debug the world!


  • 首页

  • 归档

  • 分类

  • 标签

  • 搜索

LeetCode 152.Maximum Product Subarray

发表于 2017-12-10 | 分类于 算法 , LeetCode
字数统计: 1.8k | 阅读时长≈ 0:02

LeetCode 152.Maximum Product Subarray

Description:

Find the contiguous subarray within an array (containing at least one number) which has the largest product.

阅读全文 »

LeetCode 643.Maximum Average Subarray 最大子数组的平均值

发表于 2017-12-10 | 分类于 算法 , LeetCode
字数统计: 1.8k | 阅读时长≈ 0:02

LeetCode 643.Maximum Average Subarray 最大子数组平均值

Description:

Given an array consisting of n integers, find the contiguous subarray of given length k that has the maximum average value. And you need to output the maximum average value.

阅读全文 »

LeetCode 673.Number of Longest Increasing Subsequence

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

LeetCode 673.Number of Longest Increasing Subsequence

Description:

Given an unsorted array of integers, find the number of longest increasing subsequence.

阅读全文 »

LeetCode 674.Longest Continuous Increasing Subsequence

发表于 2017-12-10 | 分类于 算法 , LeetCode
字数统计: 1.9k | 阅读时长≈ 0:02

LeetCode 674.Longest Continuous Increasing Subsequence

Description:

Given an unsorted array of integers, find the length of longest continuous increasing subsequence.

阅读全文 »

LeetCode 695. Max Area of Island

发表于 2017-12-10 | 分类于 算法 , LeetCode
字数统计: 4.6k | 阅读时长≈ 0:05

LeetCode 695. Max Area of Island

Description:

Given a non-empty 2D array grid of 0’s and 1’s, an island is a group of 1’s (representing land) connected 4-directionally (horizontal or vertical.) You may assume all four edges of the grid are surrounded by water.

Find the maximum area of an island in the given 2D array. (If there is no island, the maximum area is 0.)

Difficulty: Easy

阅读全文 »

LeetCode 697. Degree of an Array

发表于 2017-12-10 | 分类于 算法 , LeetCode
字数统计: 4.4k | 阅读时长≈ 0:04

LeetCode 697. Degree of an Array

Description:

Given a non-empty array of non-negative integers nums, the degree of this array is defined as the maximum frequency of any one of its elements.

Your task is to find the smallest possible length of a (contiguous) subarray of nums, that has the same degree as nums.

阅读全文 »

LeetCode 14.Longest Common Prefix

发表于 2017-12-10 | 分类于 算法 , LeetCode
字数统计: 1.2k | 阅读时长≈ 0:01

LeetCode 14.Longest Common Prefix

Description:

Write a function to find the longest common prefix string amongst an array of strings.

Difficulty:Easy

阅读全文 »

LeetCode 13. Roman to Integer和12. Integer to Roman

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

LeetCode 13. Roman to Integer

Description:

Given a roman numeral, convert it to an integer.

Input is guaranteed to be within the range from 1 to 3999.

Difficulty:Easy

阅读全文 »

LeetCode 9. Palindrome Number回文数判断

发表于 2017-12-10 | 分类于 算法 , LeetCode
字数统计: 1.4k | 阅读时长≈ 0:01

LeetCode 9. Palindrome Number回文数判断

Description:

Determine whether an integer is a palindrome. Do this without extra space.

Some hints:
Could negative integers be palindromes? (ie, -1)

If you are thinking of converting the integer to string, note the restriction of using extra space.

You could also try reversing an integer. However, if you have solved the problem “Reverse Integer”, you know that the reversed integer might overflow. How would you handle such case?

There is a more generic way of solving this problem.

Difficulty:Easy

阅读全文 »

LeetCode 7.Reverse Integer and 8.String to Integer(atoi)

发表于 2017-12-10 | 分类于 算法 , LeetCode
字数统计: 3.2k | 阅读时长≈ 0:03

LeetCode 7.Reverse Integer

Description:

Reverse digits of an integer.

Example1: x = 123, return 321
Example2: x = -123, return -321

Difficulty:Easy

阅读全文 »
1…91011
linjiafengyang

linjiafengyang

Debug myself and debug the world!

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