Stack base approach code not working

code- https://ide.codingblocks.com/s/247869