ShoutMix chat widget

Tuesday, March 3, 2009

String Reverse using POP and PUSH

String reverse using POP and PUSH

Ex.

1.Type a String: james
semaj

2.Type a String: 09167198201
10289176190


Download

1 comment:

Sara Reid said...

One possible Solutions
a costly procedure.
1. Use a temp stack
2. Insertion into queue
- Push the element into the original stack
3. Deletion from queue
- Pop all the elements from stack into a temp stack
- pop out the first element from the temp stack
- pop all the remaining elements back to the original stack.

protein powder