FastPrepFastPrep
Problem Brief

Array Manipulation

FULLTIMEOA

Plz check out the source image below for the original problem statement 🥰

1Example 1

Input
queries = ["+4", "+5", "+6", "+4", "+3", "-4"], diff = 1
Output
[0, 0, 1, 2, 4, 0]
Explanation
Plz check out srcImages below for the explanation 😉

Constraints

Limits and guarantees your solution can rely on.

🐢
public int[] arrayManipulation(String[] queries, int diff) {
  // write your code here
}
Input

queries

["+4", "+5", "+6", "+4", "+3", "-4"]

diff

1

Output

[0, 0, 1, 2, 4, 0]

Sign in to submit your solution.