Wednesday, January 22, 2014

Practical Week 3

This week's practical, I've been assigned to do a driver file that uses a Stack class and a Queue class. It was quite hard at first because I don't really understand the concept of ADT. But, after reading the code in stack.py I began to understand what exactly is gong on. Stack is basically putting new object on top of the deck and pull out the top of the deck when pop. Queue on the other hand is putting new object on the back of the deck but still, pulling out the top of the deck when dequeue. Another major problem I had this week is to cut down the running time for my Queue code. I got the idea of keeping track the head and the tail but I still don't know how to implement it. Hopefully, Piazza and my TA can help me with this.

No comments:

Post a Comment