Sunday, April 5, 2015

(SUMMARY ON ADT) Some notes on Abstract Data Types

Since taking the CSC148 course, I'm seen several kinds of  data structures, like stack, queues and trees. After taking lectures and lab works, I have learnt to setup these structures and make use of them in the assignment.

I found lots of my friends found it difficult to distinguish between queue and stack, but I am doing it well. Just like the name of these two data structures, queues are like the queues in Starbucks, while, the person in the front leave the queue after taking orders, and the costumers join the queue from the end. The stacks are like like a stack of cards on the table, while people can only pick or add cards from the top. Trees are way easier to understand, it's just like a tree, got data on the branches and nodes, while data grows on it.

Although I have learnt to implement these structures, I am lack of experience on applying it in real-life cases. Sometimes it's hard to decide which of them should be implemented, or how to represent data in these structures. For example, I found Tree is useful in Assignment 2 to represent all those possible moves and results of the game to predict which move is better, but it takes days to work it out, and I'm still working on it. Sad Story.

No comments:

Post a Comment