Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2011. Final Value of Variable After Performing Operations
Given a list of increment/decrement operation strings applied to a single variable X starting at 0, compute the final value by iterating through the operations and adding +1 for any "++" operation and −1 for any "--" operation. Essentially it's just counting net increments across the array.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.