【题目描述】 Print numbers from 1 to the largest number with N digits by recursion. Notice It's pretty easy to do recursion like: recursion(i) { if i > larg ...
分类:
其他好文 时间:
2018-04-06 12:22:46
阅读次数:
163
Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [-2,1,-3,4,-1,2, ...
分类:
编程语言 时间:
2018-04-05 15:51:33
阅读次数:
190
In a 2D grid from (0, 0) to (N-1, N-1), every cell contains a 1, except those cells in the given list mines which are 0. What is the largest axis-alig ...
分类:
其他好文 时间:
2018-03-31 00:41:53
阅读次数:
168
原题链接: "https://leetcode.com/problems/kth largest element in an array/description/" 代码如下: ...
分类:
其他好文 时间:
2018-03-25 11:57:35
阅读次数:
175
codeforces 407D Largest Submatrix 3 题意 找出最大子矩阵,须满足矩阵内的元素互不相等。 题解 官方做法 http://codeforces.com/blog/entry/11333 $O(n^6)$ 枚举子矩阵,暴力check。 $O(n^4)$ 枚举上下边界,双 ...
分类:
其他好文 时间:
2018-03-24 20:45:43
阅读次数:
223
Given a 2D binary matrix filled with 0's and 1's, find the largest square containing only 1's and return its area. For example, given the following ma ...
分类:
其他好文 时间:
2018-03-21 11:51:50
阅读次数:
142
In a given integer array nums, there is always exactly one largest element. Find whether the largest element in the array is at least twice as much as ...
分类:
其他好文 时间:
2018-03-20 22:08:52
阅读次数:
197
Find the largest palindrome made from the product of two n-digit numbers. Since the result could be very large, you should return the largest palindro ...
分类:
其他好文 时间:
2018-03-18 21:41:39
阅读次数:
101
题意:给定一个长度为偶数的数,输出小于它的最大的美丽数。如果一个数长度为偶数,且没有前导零,并存在一种排列是回文数的数为美丽数。给定的t个数长度总和不超过200000. 分析: 1、存在一种排列为回文数,即这个数包含的数字都是偶数个。 2、预处理出每个数字的个数。 3、从最右边一位依次往左枚举,当逐 ...
分类:
其他好文 时间:
2018-03-11 00:19:22
阅读次数:
341
问题描述: Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [?2,1,?3,4 ...
分类:
编程语言 时间:
2018-03-09 20:38:16
阅读次数:
246