← 返回 meta 的题目列表Non-negative Array Optimization
类型:online_judge
Given a non-negative integer array, find a space-optimized way to compute results under specific conditions, such as using two-pointer technique instead of prefix sum. Please implement the function.
Example
Input
5
1 2 3 4 5