Reimplemented stack as a generic type

Implemented a bracket matching application which checks whether the given string has right amount or matched brackets or not