Implemented a method that sorts a stack only using another stack