首页
题库
面试
求职
学习
竞赛
More+
所有博客
搜索面经/职位/试题/公司
搜索
我要招人
去企业版
登录 / 注册
首页
>
试题广场
>
乘积最大的连续子序列
[编程题]乘积最大的连续子序列
热度指数:33
时间限制:C/C++ 1秒,其他语言2秒
空间限制:C/C++ 256M,其他语言512M
算法知识视频讲解
给定一个整数数组
,找出一个序列中乘积最大的连续子序列的乘积(该序列至少包含一个数)。
示例1
输入
[2,3,-4,2]
输出
6
马上挑战
算法知识视频讲解
提交运行
算法知识视频讲解
添加笔记
求解答(0)
邀请回答
收藏(3)
分享
纠错
提交结果有问题?
1个回答
0篇题解
开通博客
暂无题解
问题信息
算法工程师
2020
映客
上传者:
小小
难度:
1条回答
3收藏
1398浏览
热门推荐
通过挑战的用户
牛客44005...
2022-11-08 18:55:06
D0x63
2022-10-24 09:24:18
humble66
2022-08-12 16:47:36
牛客17991...
2022-08-04 16:25:21
牛客87388...
2022-07-31 15:09:53
相关试题
以下代码的运行结果为():#inc...
算法工程师
映客
2020
评论
(2)
假定所有变量均已正确定义,则下列程...
算法工程师
映客
2020
评论
(0)
看图回答
判断推理
2020
人力资源
安永
审计
税务服务
风险管理
管理咨询
行政管理
评论
(2)
来自
职能类模拟题2
模型稀疏化(Pruning)技术主...
大模型概念
评论
(1)
以下哪种方法主要用于缓解大模型训练...
大模型概念
评论
(1)
乘积最大的连续子序列
扫描二维码,关注牛客网
意见反馈
下载牛客APP,随时随地刷题
import java.util.*; public class Solution { /** * * @param nums int整型一维数组 * @return int整型 */ public int maxProduct (int[] nums) { // write code here } }
class Solution { public: /** * * @param nums int整型一维数组 * @param numsLen int nums数组长度 * @return int整型 */ int maxProduct(int* nums, int numsLen) { // write code here } };
# # # @param nums int整型一维数组 # @return int整型 # class Solution: def maxProduct(self , nums ): # write code here
/** * * @param nums int整型一维数组 * @return int整型 */ function maxProduct( nums ) { // write code here } module.exports = { maxProduct : maxProduct };
# # # @param nums int整型一维数组 # @return int整型 # class Solution: def maxProduct(self , nums ): # write code here
[2,3,-4,2]
6