title: Implementation of stack
body: <p>I have recently had a lesson in data structure and the first thing that was taught was how to implement a stack in an array. I could understand how the stack implementation was done but I don't understand the reason why it is done. I mean are't arrays more useful and practical and flexible compared to stacks. I can't really thing of any advantage of stack compared to arrays which lead to the need of building a stack out of an array. Can you help me clear my ideas about these concept?</p>