-
-
Save qunabu/10bad20636dccd856737ef9312c93050 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Reverse Polish Notation, add 3 and 4, one would write 3 4 + rather than 3 + 4 | |
it("should properly calculate a RPN expression", () => { | |
const result = RPN("5 1 2 + 4 * - 10 /"); | |
expect(result).toBe(-0.7); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment