diff --git a/README.md b/README.md index 8b4eddb..65e127a 100644 --- a/README.md +++ b/README.md @@ -145,6 +145,7 @@ which is licensed under the GNU Lesser General Public License v3.0 (`LGPL-3.0`). | 69 | [Sqrt(x)](src/lc0069.c) | Mathematics | Square root | `sqrt` | | 75 | [Sort Colors](src/lc0075.c) | Sorting | Sort | `qsort` | | 77 | [Combinations](src/lc0077.c) | Backtracking | Matrix | `CombinationIterator` | +| 150 | [Evaluate Reverse Polish Notation](src/lc0150.c) | Mathematics | Integer | `rpn_evaluate` | | 202 | [Happy Number](src/lc0202.c) | Mathematics | Boolean | `SquareDigitChain` | | 204 | [Count Primes](src/lc0204.c) | Mathematics | Count | `Sieve`, `binary_search_rank` | | 258 | [Add Digits](src/lc0258.c) | Mathematics | Digital root | | diff --git a/src/lc0150.c b/src/lc0150.c new file mode 100644 index 0000000..6d51892 --- /dev/null +++ b/src/lc0150.c @@ -0,0 +1,10 @@ +// Licensed under the MIT License. + +// Evaluate Reverse Polish Notation + +#include "../lib/rpn.h" + +int evalRPN(String tokens[], int tokensSize) +{ + return rpn_evaluate(tokens, tokensSize); +}