3522. Calculate Score After Performing Instructions
You are given two arrays, instructions and values, both of size n. You need to simulate a process based on the following rules: - You start at the first instruction at index i = 0 with an initial score of 0. - If instructions[i] is "add": - Add values[i] to your score. - Move to the next instruction (i + 1). - If instructions[i] is "jump": - Move to the instruction at index (i + values[i
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start