第一题:if / switch 第二题:startsWith 第三题:sort 第四题:单调栈,两个辅助数组,一个left,0-i弄成单调递增,left[i]为0-i的和,一个right,i-n单调递减,right[i]为i-n的和。取left+right最大的位置为最高点。
点赞 评论

相关推荐

点赞 评论 收藏
分享
VirtualBool:都去逗他了?
点赞 评论 收藏
分享

牛客热帖

更多
牛客网
牛客企业服务