Skip to content

Commit

Permalink
Update Daily
Browse files Browse the repository at this point in the history
  • Loading branch information
hikjik committed Jan 30, 2024
1 parent 30a9f30 commit c36ee86
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions PROBLEM_LIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@
| 626. | [Exchange Seats](https://leetcode.com/problems/exchange-seats/) | [SQL](./extra/sql/exchange-seats/solution.sql), [PY](./extra/pandas/exchange-seats/solution.py) | <img src='https://img.shields.io/badge/Medium-darkorange?style=flat-square'/> | | <img src='https://img.shields.io/badge/Database-337c7f?style=flat-square'/> | |
| 627. | [Swap Salary](https://leetcode.com/problems/swap-salary/) | [SQL](./extra/sql/swap-salary/solution.sql), [PY](./extra/pandas/swap-salary/solution.py) | <img src='https://img.shields.io/badge/Easy-darkgreen?style=flat-square'/> | | <img src='https://img.shields.io/badge/Database-337c7f?style=flat-square'/> | |
| 628. | [Maximum Product of Three Numbers](https://leetcode.com/problems/maximum-product-of-three-numbers/) | [C++](./solutions/maximum-product-of-three-numbers/solution.hpp) | <img src='https://img.shields.io/badge/Easy-darkgreen?style=flat-square'/> | | <img src='https://img.shields.io/badge/Array-57337f?style=flat-square'/> <img src='https://img.shields.io/badge/Math-7f5933?style=flat-square'/> <img src='https://img.shields.io/badge/Sorting-333b7f?style=flat-square'/> | |
| 629. | [K Inverse Pairs Array](https://leetcode.com/problems/k-inverse-pairs-array/) | [C++](./solutions/k-inverse-pairs-array/solution.hpp) | <img src='https://img.shields.io/badge/Hard-darkred?style=flat-square'/> | | <img src='https://img.shields.io/badge/Dynamic Programming-37337f?style=flat-square'/> | |
| 632. | [Smallest Range Covering Elements from K Lists](https://leetcode.com/problems/smallest-range-covering-elements-from-k-lists/) | [C++](./solutions/smallest-range-covering-elements-from-k-lists/solution.hpp) | <img src='https://img.shields.io/badge/Hard-darkred?style=flat-square'/> | | <img src='https://img.shields.io/badge/Array-57337f?style=flat-square'/> <img src='https://img.shields.io/badge/Hash Table-7f337a?style=flat-square'/> <img src='https://img.shields.io/badge/Greedy-44337f?style=flat-square'/> <img src='https://img.shields.io/badge/Sliding Window-7f6033?style=flat-square'/> <img src='https://img.shields.io/badge/Sorting-333b7f?style=flat-square'/> <img src='https://img.shields.io/badge/Heap (Priority Queue)-71337f?style=flat-square'/> | |
| 633. | [Sum of Square Numbers](https://leetcode.com/problems/sum-of-square-numbers/) | [C++](./solutions/sum-of-square-numbers/solution.hpp) | <img src='https://img.shields.io/badge/Medium-darkorange?style=flat-square'/> | | <img src='https://img.shields.io/badge/Math-7f5933?style=flat-square'/> <img src='https://img.shields.io/badge/Two Pointers-7f6633?style=flat-square'/> <img src='https://img.shields.io/badge/Binary Search-33557f?style=flat-square'/> | |
| 637. | [Average of Levels in Binary Tree](https://leetcode.com/problems/average-of-levels-in-binary-tree/) | [C++](./solutions/average-of-levels-in-binary-tree/solution.hpp) | <img src='https://img.shields.io/badge/Easy-darkgreen?style=flat-square'/> | | <img src='https://img.shields.io/badge/Tree-7f3373?style=flat-square'/> <img src='https://img.shields.io/badge/Depth First Search-337f35?style=flat-square'/> <img src='https://img.shields.io/badge/Breadth First Search-377f33?style=flat-square'/> <img src='https://img.shields.io/badge/Binary Tree-7f336d?style=flat-square'/> | |
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,7 @@ Due to [restrictions](https://github.com/orgs/community/discussions/23920) on th
| 626. | [Exchange Seats](https://leetcode.com/problems/exchange-seats/) | [SQL](./extra/sql/exchange-seats/solution.sql), [PY](./extra/pandas/exchange-seats/solution.py) | <img src='https://img.shields.io/badge/Medium-darkorange?style=flat-square'/> | | <img src='https://img.shields.io/badge/Database-337c7f?style=flat-square'/> | |
| 627. | [Swap Salary](https://leetcode.com/problems/swap-salary/) | [SQL](./extra/sql/swap-salary/solution.sql), [PY](./extra/pandas/swap-salary/solution.py) | <img src='https://img.shields.io/badge/Easy-darkgreen?style=flat-square'/> | | <img src='https://img.shields.io/badge/Database-337c7f?style=flat-square'/> | |
| 628. | [Maximum Product of Three Numbers](https://leetcode.com/problems/maximum-product-of-three-numbers/) | [C++](./solutions/maximum-product-of-three-numbers/solution.hpp) | <img src='https://img.shields.io/badge/Easy-darkgreen?style=flat-square'/> | | <img src='https://img.shields.io/badge/Array-57337f?style=flat-square'/> <img src='https://img.shields.io/badge/Math-7f5933?style=flat-square'/> <img src='https://img.shields.io/badge/Sorting-333b7f?style=flat-square'/> | |
| 629. | [K Inverse Pairs Array](https://leetcode.com/problems/k-inverse-pairs-array/) | [C++](./solutions/k-inverse-pairs-array/solution.hpp) | <img src='https://img.shields.io/badge/Hard-darkred?style=flat-square'/> | | <img src='https://img.shields.io/badge/Dynamic Programming-37337f?style=flat-square'/> | |
| 632. | [Smallest Range Covering Elements from K Lists](https://leetcode.com/problems/smallest-range-covering-elements-from-k-lists/) | [C++](./solutions/smallest-range-covering-elements-from-k-lists/solution.hpp) | <img src='https://img.shields.io/badge/Hard-darkred?style=flat-square'/> | | <img src='https://img.shields.io/badge/Array-57337f?style=flat-square'/> <img src='https://img.shields.io/badge/Hash Table-7f337a?style=flat-square'/> <img src='https://img.shields.io/badge/Greedy-44337f?style=flat-square'/> <img src='https://img.shields.io/badge/Sliding Window-7f6033?style=flat-square'/> <img src='https://img.shields.io/badge/Sorting-333b7f?style=flat-square'/> <img src='https://img.shields.io/badge/Heap (Priority Queue)-71337f?style=flat-square'/> | |
| 633. | [Sum of Square Numbers](https://leetcode.com/problems/sum-of-square-numbers/) | [C++](./solutions/sum-of-square-numbers/solution.hpp) | <img src='https://img.shields.io/badge/Medium-darkorange?style=flat-square'/> | | <img src='https://img.shields.io/badge/Math-7f5933?style=flat-square'/> <img src='https://img.shields.io/badge/Two Pointers-7f6633?style=flat-square'/> <img src='https://img.shields.io/badge/Binary Search-33557f?style=flat-square'/> | |
| 637. | [Average of Levels in Binary Tree](https://leetcode.com/problems/average-of-levels-in-binary-tree/) | [C++](./solutions/average-of-levels-in-binary-tree/solution.hpp) | <img src='https://img.shields.io/badge/Easy-darkgreen?style=flat-square'/> | | <img src='https://img.shields.io/badge/Tree-7f3373?style=flat-square'/> <img src='https://img.shields.io/badge/Depth First Search-337f35?style=flat-square'/> <img src='https://img.shields.io/badge/Breadth First Search-377f33?style=flat-square'/> <img src='https://img.shields.io/badge/Binary Tree-7f336d?style=flat-square'/> | |
Expand Down Expand Up @@ -1095,4 +1096,3 @@ Due to [restrictions](https://github.com/orgs/community/discussions/23920) on th
| 1403. | [Minimum Subsequence in Non-Increasing Order](https://leetcode.com/problems/minimum-subsequence-in-non-increasing-order/) | [C++](./solutions/minimum-subsequence-in-non-increasing-order/solution.hpp) | <img src='https://img.shields.io/badge/Easy-darkgreen?style=flat-square'/> | | <img src='https://img.shields.io/badge/Array-57337f?style=flat-square'/> <img src='https://img.shields.io/badge/Greedy-44337f?style=flat-square'/> <img src='https://img.shields.io/badge/Sorting-333b7f?style=flat-square'/> | |
| 1406. | [Stone Game III](https://leetcode.com/problems/stone-game-iii/) | [C++](./solutions/stone-game-iii/solution.hpp) | <img src='https://img.shields.io/badge/Hard-darkred?style=flat-square'/> | | <img src='https://img.shields.io/badge/Array-57337f?style=flat-square'/> <img src='https://img.shields.io/badge/Math-7f5933?style=flat-square'/> <img src='https://img.shields.io/badge/Dynamic Programming-37337f?style=flat-square'/> <img src='https://img.shields.io/badge/Game Theory-7f5333?style=flat-square'/> | |
| 1407. | [Top Travellers](https://leetcode.com/problems/top-travellers/) | [SQL](./extra/sql/top-travellers/solution.sql), [PY](./extra/pandas/top-travellers/solution.py) | <img src='https://img.shields.io/badge/Easy-darkgreen?style=flat-square'/> | | <img src='https://img.shields.io/badge/Database-337c7f?style=flat-square'/> | |
| 1408. | [String Matching in an Array](https://leetcode.com/problems/string-matching-in-an-array/) | [C++](./solutions/string-matching-in-an-array/solution.hpp) | <img src='https://img.shields.io/badge/Easy-darkgreen?style=flat-square'/> | | <img src='https://img.shields.io/badge/Array-57337f?style=flat-square'/> <img src='https://img.shields.io/badge/String-7f334c?style=flat-square'/> <img src='https://img.shields.io/badge/String Matching-7f3346?style=flat-square'/> | |
6 changes: 3 additions & 3 deletions solutions/evaluate-reverse-polish-notation/solution.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ class Solution {

std::stack<int> stack;
for (const auto &token : tokens) {
if (ops.count(token)) {
int b = stack.top();
if (ops.contains(token)) {
const auto b = stack.top();
stack.pop();
int a = stack.top();
const auto a = stack.top();
stack.pop();
stack.push(ops.at(token)(a, b));
} else {
Expand Down

0 comments on commit c36ee86

Please sign in to comment.