Skip to content

Commit

Permalink
2011
Browse files Browse the repository at this point in the history
  • Loading branch information
isinsuarici committed Apr 20, 2022
1 parent dd04cbe commit 7ad158a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions E_2011_FinalValueofVariableAfterPerformingOperations.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
class Solution:
def finalValueAfterOperations(self, operations: List[str]) -> int:
X=0
for op in operations:
if op[1]=="-":
X=X-1
else:
X=X+1
return X

0 comments on commit 7ad158a

Please sign in to comment.