Welcome to Day 37 of the DSA Coding Challenge:


Todays Goals(Stacks):

-Stacks Data Structure Crash Course

Question 1:Construct Stack

Implement a Stack:

1.Using an Array

2.with a Stack class using a Linked list

One should be able to add to the stack and remove from the stack following the LIFO property.


Question 2:Reverse Polish Notation

Evaluate the value of an arithmetic expression in Reverse Polish Notation(See example). Valid operators are +, -, *, and /. Note that division between two integers should truncate toward zero. It is guaranteed that the given RPN expression is always valid. That means the expression would always evaluate to a result, and there will not be any division by zero operation. The Input is an array of strings where each element is either a valid operator or an integer. E.g.[“1”,”2”,”+”]


All the best!