首页
题库
面试
求职
学习
竞赛
More+
所有博客
搜索面经/职位/试题/公司
搜索
我要招人
去企业版
登录 / 注册
首页
>
试题广场
>
寻找乘积最大的连续子序列
[编程题]寻找乘积最大的连续子序列
热度指数:26
时间限制:C/C++ 1秒,其他语言2秒
空间限制:C/C++ 256M,其他语言512M
算法知识视频讲解
给定一个整数序列
,计算该序列中最大的连续子序列的乘积(该序列至少包含一个数)。
示例1
输入
[2,3,-4,2]
输出
6
马上挑战
算法知识视频讲解
提交运行
算法知识视频讲解
添加笔记
求解答(0)
邀请回答
收藏(3)
分享
纠错
提交结果有问题?
2个回答
0篇题解
开通博客
暂无题解
问题信息
算法工程师
2020
映客
上传者:
小小
难度:
2条回答
3收藏
1637浏览
热门推荐
通过挑战的用户
NoCoinC...
2022-07-12 20:53:10
空城深处,住着空心、
2022-07-07 15:15:32
大风山
2022-07-01 17:47:06
牛客86181...
2022-06-21 18:49:01
紫宵银月
2022-05-17 15:49:51
相关试题
看图回答
判断推理
2020
人力资源
安永
审计
税务服务
风险管理
管理咨询
行政管理
评论
(2)
来自
职能类模拟题2
假定所有变量均已正确定义,则下列程...
算法工程师
映客
2020
评论
(0)
如果你想列出当前目录以及子目录下所...
算法工程师
映客
2020
评论
(2)
假如张三使用机器制造一个螺丝帽直径...
机器学习
评论
(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