Sunday, 15 February 2015

Week #6: Stacks and Queues


This week we learned about Stacks. Stacks are a way of organizing information. When a Stack takes in new inputs it adds it to the Stack, the Stack works by piling up the inputs and the user can check if it is empty, what the top item is, and pop off the input on top (the last input entered). We also learned about Queues which are similar to Stacks in the way they store information but rather than the first item put in being the last item taken out (Stacks), for Queues the first item put in will be the first item taken out.

No comments:

Post a Comment