This code is towers of hanoi in c++
Replace the use of in your Peg class with a Stack class and aNode class that you write.
Your Node class should consist of an element of type int and apointer to the Node class. It should have appropriate constructors,a destructor, and accessors / mutators for each attribute.
Your Stack class should implement a stack data type thatconsists of Node objects which are dynamically allocated uponcreation. It should have a constructor, a destructor, and methodsfor push, pop, reading the top element, returning the number ofelements in the stack, and outputting the stack to the display.Memory
PayPal Gateway not configured
PayPal Gateway not configured