Skip to content

Commit b3398ef

Browse files
committed
Update evaluate-reverse-polish-notation.cpp
1 parent 45c5a4a commit b3398ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

C++/evaluate-reverse-polish-notation.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ class Solution {
1212
if (!is_operator(tok)) {
1313
s.emplace(tok);
1414
} else {
15-
auto y = stoi(s.top());
15+
auto&& y = stoi(s.top());
1616
s.pop();
17-
auto x = stoi(s.top());
17+
auto&& x = stoi(s.top());
1818
s.pop();
1919
if (tok[0] == '+') {
2020
x += y;

0 commit comments

Comments
 (0)