Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
151 views
in Technique[技术] by (71.8m points)

php 一个数组 生成与该数组最大相同的数组

例如:
$max = 28;
$a = [1,2,4,9,19,24];
与它最大相同的数组
[1,2,4,9,19,-]
[1,2,4,9,-,24]
[1,2,-,9,19,24]
还有可能是
[1,2,4,9,-,19]

最大不能超过28且数组必须是由小到大

该怎么写函数


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...