码迷,mamicode.com
首页 >  
搜索关键字:given n integers    ( 24278个结果
[LeetCode] 01 Matrix 零一矩阵
Given a matrix consists of 0 and 1, find the distance of the nearest 0 for each cell. The distance between two adjacent cells is 1. Example 1: Input: ...
分类:其他好文   时间:2020-03-16 23:35:41    阅读次数:72
1380. Lucky Numbers in a Matrix
Given a m * n matrix of distinct numbers, return all lucky numbers in the matrix in any order. A lucky number is an element of the matrix such that it ...
分类:其他好文   时间:2020-03-16 09:41:48    阅读次数:34
628. Maximum Product of Three Numbers
问题:求一个数列里三个数相乘的最大值 Input: [1,2,3] Output: 6 Input: [1,2,3,4] Output: 24 Note: 1.The length of the given array will be in range [3,104] and all element ...
分类:其他好文   时间:2020-03-15 13:25:00    阅读次数:53
[LeetCode] 739. Daily Temperatures
每日温度。题意是给一个数组,表示每天的气温,请返回一个数组,对应位置的输入是你需要再等待多久温度才会升高超过该日的天数。如果之后都不会升高,请在该位置用 0 来代替。例子, For example, given the list of temperatures T = [73, 74, 75, 71 ...
分类:其他好文   时间:2020-03-15 10:02:10    阅读次数:54
1031. Maximum Sum of Two Non-Overlapping Subarrays
Given an array A of non-negative integers, return the maximum sum of elements in two non-overlapping (contiguous) subarrays, which have lengths L and  ...
分类:移动开发   时间:2020-03-15 09:54:01    阅读次数:75
A - Yet Another Tetris Problem
You are given some Tetris field consisting of nn columns. The initial height of the ii-th column of the field is aiai blocks. On top of these columns ...
分类:其他好文   时间:2020-03-14 23:53:35    阅读次数:75
B - Yet Another Palindrome Problem
You are given an array aa consisting of nn integers. Your task is to determine if aa has some subsequence of length at least 33 that is a palindrome. ...
分类:其他好文   时间:2020-03-14 23:35:49    阅读次数:96
【List习题】A1051 Pop Sequence
Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, ..., N and pop randomly. You are supposed to tell if a given s ...
分类:其他好文   时间:2020-03-14 21:56:52    阅读次数:69
leetcode162 Find Peak Element
1 """ 2 A peak element is an element that is greater than its neighbors. 3 Given an input array nums, where nums[i] ≠ nums[i+1], find a peak element a ...
分类:其他好文   时间:2020-03-14 21:47:44    阅读次数:51
PAT.Emergency(求最短路条数 + 最短路中点权和最大的那条最短路的点权和)
1003 Emergency (25分) As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities ...
分类:其他好文   时间:2020-03-14 13:14:44    阅读次数:85
24278条   上一页 1 ... 58 59 60 61 62 ... 2428 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!