得加个特判,number小于0的时候for循环条件变成arr.length-1
点赞

相关推荐

牛客网
牛客网在线编程
牛客网题解
牛客企业服务