上一页 1 ··· 7 8 9 10 11 12 13 14 下一页
摘要: In a 2 dimensional array grid, each value grid[i][j] represents the height of a building located there. We are allowed to increase the height of any n 阅读全文
posted @ 2018-12-26 03:11 yuxihong 阅读(114) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers A with even length, return true if and only if it is possible to reorder it such that A[2 * i + 1] = 2 * A[2 * i] for every 阅读全文
posted @ 2018-12-26 02:28 yuxihong 阅读(112) 评论(0) 推荐(0) 编辑
摘要: Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher's h-index. According 阅读全文
posted @ 2018-12-26 00:25 yuxihong 阅读(105) 评论(0) 推荐(0) 编辑
摘要: For some fixed N, an array A is beautiful if it is a permutation of the integers 1, 2, ..., N, such that: For every i < j, there is no k with i < k < 阅读全文
posted @ 2018-12-25 15:54 yuxihong 阅读(168) 评论(0) 推荐(0) 编辑
摘要: To some string S, we will perform some replacement operations that replace groups of letters with new ones (not necessarily the same size). Each repla 阅读全文
posted @ 2018-12-24 15:38 yuxihong 阅读(156) 评论(0) 推荐(0) 编辑
摘要: Given a 01 matrix M, find the longest line of consecutive one in the matrix. The line could be horizontal, vertical, diagonal or anti-diagonal. Exampl 阅读全文
posted @ 2018-12-24 14:49 yuxihong 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 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.) Yo 阅读全文
posted @ 2018-12-24 00:53 yuxihong 阅读(221) 评论(0) 推荐(0) 编辑
摘要: Given a set of points in the xy-plane, determine the minimum area of any rectangle formed from these points, with sides not necessarily parallel to th 阅读全文
posted @ 2018-12-23 21:48 yuxihong 阅读(416) 评论(0) 推荐(0) 编辑
摘要: In a array A of size 2N, there are N+1 unique elements, and exactly one of these elements is repeated N times. Return the element repeated N times. Ex 阅读全文
posted @ 2018-12-23 19:24 yuxihong 阅读(274) 评论(0) 推荐(0) 编辑
摘要: Given an array A of integers, a ramp is a tuple (i, j) for which i < j and A[i] <= A[j]. The width of such a ramp is j - i. Find the maximum width of 阅读全文
posted @ 2018-12-23 14:11 yuxihong 阅读(392) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 下一页