EASY PEASY solution


#1

USE STACK it will be easy for solving.