No.164 Maximum GapGiven an unsorted array, find the maximum difference between the successive elements in its sorted form.Try to solve it in linear ti...
分类:
其他好文 时间:
2015-06-08 19:01:57
阅读次数:
80
Given an m x n chessboard where you want to place chess knights. You have to find the number of maximum knights that can be placed in the chessboard such that no two knights attack each other.Those who...
分类:
其他好文 时间:
2015-06-08 17:32:11
阅读次数:
118
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,1,?5,4],
the contiguous subarray [4,?1,2,1] has the...
分类:
其他好文 时间:
2015-06-08 11:44:36
阅读次数:
114
题目描述
Given a sequence of positive integers and another positive integer p. The sequence is said to be a "perfect sequence"
if M <= m * p where M and m are the maximum and minimum numbers in the seq...
分类:
其他好文 时间:
2015-06-08 11:38:36
阅读次数:
105
The determinant of a matrix 2?×?2 is defined as follows:
A matrix is called degenerate if its determinant is equal to zero.
The norm ||A|| of a matrix A is
defined as a maximum of absolute v...
分类:
其他好文 时间:
2015-06-07 13:52:04
阅读次数:
121
Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may complet...
分类:
编程语言 时间:
2015-06-06 22:05:00
阅读次数:
169
用maven打包写好的jar,在放到hive中作临时函数时报错。
错误信息如下:
hive> create temporary function maxvalue as "com.leaf.data.Maximum";
java.lang.SecurityException: Invalid signature file digest for Manifest main attribu...
分类:
其他好文 时间:
2015-06-06 16:38:31
阅读次数:
227
Given an unsorted array, find the maximum difference between the successive elements in its sorted form.Try to solve it in linear time/space.Return 0 ...
分类:
编程语言 时间:
2015-06-05 21:00:00
阅读次数:
128
Given an array of non-negative integers, you are initially positioned at the first index of the array.
Each element in the array represents your maximum jump length at that position.
Determine if yo...
分类:
其他好文 时间:
2015-06-05 15:48:10
阅读次数:
129
1 题目:Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longe...
分类:
其他好文 时间:
2015-06-05 15:31:51
阅读次数:
137