The stack can be implemented as an array and a variable that will keep the current top of the stack .. the coding is trivial once you understand this
pseudocode: Array A; int current; function pop() return A[current--]; function push(object o) A[++current] = o; (This is where we overwrite). --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/algogeeks -~----------~----~----~----~------~----~------~--~---
