Implemented the Stack generic data structure