Given a string with single digit numbers and four simple arithmetic operations in a form of string that recorded in postfix (reverse Pascal) notation, perform the operation and validate the recording. Write pseudo-code that returns result or informs about malformed recording.
Sigiloso
Solution is simple and straightforward. Can be found on internet. Use stack while read the record to push numbers and perform operation on two last numbers in the stack. Push result into the stack. Once finished reading the record, pull a number from the stack and return. Perform error checking on record reading, and stack state to handle malformed record.