【文件属性】:
文件名称:leetcode答案-easy_Maximum-Subarray:easy_Maximum-Subarray
文件大小:4KB
文件格式:ZIP
更新时间:2021-06-30 01:00:43
系统开源
leetcode
答案
easy_Maximum-Subarray
提交链接
/
Submit
(You
need
register/login
first
before
submit.)
(在提交前你需要先注册或登录)
题目描述
/
Description
Given
an
integer
array
nums,
find
the
contiguous
subarray
(containing
at
least
one
number)
which
has
the
largest
sum
and
return
its
sum.
给定一个整数数组
nums
,找到一个具有最大和的连续子数组(子数组最少包含一个元素),返回其最大和。
Bonus:
If
you
have
realized
the
solution
with
O(n),
try
something
more
tricky
than
standard
program
by
divide-and-conquer
method.
附加:如果你已经实现为
O(n)
的解法,尝试使用比标准程序更为精妙的分治法求解。
输入
/
Inpu
【文件预览】:
easy_Maximum-Subarray-master
----README.md(3KB)
----solve.c(1KB)
----solve.py(427B)
----solve.cpp(1024B)