Functions for Postfix Expression algorithm.
void evaluate(float a, float b, const std::string &operation, std::stack< float > &stack)
Evaluate answer using given last two operands from and operation.
bool is_number(const std::string &s)
Checks if scanned string is a number.
static void test_function_2()
Test function 2 with input array {'100', '200', '+', '2', '/', '5', '*', '7', '+'}...
static void test_function_1()
Test function 1 with input array {'2', '3', '1', '*', '+', '9', '-'}.
float postfix_evaluation(std::array< std::string, N > input)
Postfix Evaluation algorithm to compute the value from given input array.