Home > php教程 > PHP源码 > body text

由正负数组成的任意长度数组,求任意长度最大和值?

PHP中文网
Release: 2016-05-25 16:59:26
Original
1190 people have browsed it

如数组:array(1,-3,-5,-7,8,9,-11,5);
最大长度为:8,9;
和值为17.

<?php
function get_max_sum(){
//TODO @大神请做!
}
Copy after login
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template