3. Suppose that the Stack class uses Single_list and we want to move the contents of one stack onto another stack. Becau
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
3. Suppose that the Stack class uses Single_list and we want to move the contents of one stack onto another stack. Becau
3. Suppose that the Stack class uses Single_list and we want to move the contents of one stack onto another stack. Because the Stack is not a friend of the Single_list (and it would be foolish to allow this), we need a new push_front( Single_list & ) function that moves the contents of the argument onto the front of the current linked list in ©(1time while emptying the argument. 4. Consider the undo and redo operations or forward and back operations on a browser. While it is likely more obvious that operations to undo or pages to go back to may be stored using a stack, what is the behaviour of the redo or page forward operations ? How is it related to being a stack? Are there times at which the redo or forward operations stored in the stack are cleared.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!