aboutsummaryrefslogtreecommitdiff
path: root/baseball_game.cpp
diff options
context:
space:
mode:
authorJack Sangdahl <[email protected]>2025-02-03 15:37:19 -0700
committerJack Sangdahl <[email protected]>2025-02-03 15:37:19 -0700
commit55a67f776dd9acd258cae16ffb636751666b0f40 (patch)
tree601539de43809b70ceb8228a12c35883fa300b03 /baseball_game.cpp
parenta0030873dabb517594ae0394350d6715071f7fb8 (diff)
downloadleetcode-55a67f776dd9acd258cae16ffb636751666b0f40.tar.gz
leetcode-55a67f776dd9acd258cae16ffb636751666b0f40.zip
chore: Remove incomplete solutions
Diffstat (limited to 'baseball_game.cpp')
-rw-r--r--baseball_game.cpp30
1 files changed, 0 insertions, 30 deletions
diff --git a/baseball_game.cpp b/baseball_game.cpp
deleted file mode 100644
index f5d1b35..0000000
--- a/baseball_game.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-#include "leetcode.h"
-
-class Solution {
-public:
- int calPoints(vector<string> &ops) {
- int val1, val2, ans = 0;
- stack<int> s;
- for (string i : ops) {
- if (i == "C")
- s.pop();
- else if (i == "D")
- s.push(s.top() * 2);
- else if (i == "+") {
- val1 = s.top();
- s.pop();
- val2 = s.top();
- s.push(val1);
- s.push(val1 + val2);
- } else
- s.push(stoi(i));
- }
- while (s.size() != 0) {
- ans += s.top();
- s.pop();
- }
- return ans;
- }
-};
-
-int main() {}