Hi
guys
I want to ask how can i dublicate a stack
if the stack is array or linked list?
|
Go4Expert Member
|
|
| 20Jul2008,13:48 | #1 |
|
Hi
guys I want to ask how can i dublicate a stack if the stack is array or linked list? |
|
Newbie Member
|
|
| 21Jul2008,11:16 | #2 |
|
what do you mean duplicate? do you mean make a copy?
|
|
Go4Expert Member
|
|
| 21Jul2008,14:23 | #3 |
|
No
I mean to let the stack=2*stack void dublicatestack(stack m2) { int m; while(!isEmpty()) { m=pop(); m2.push(m); push(m2.pop()); push(m); . . . . } |