Sunday, 1 March 2015

To be marked: Abstract Data Types

Summary of Abstract Data Types

I'm sure we're all familiar with our more common data types that we've been always using, things like lists, strings, integers, etc. However, programming languages, including our wonderful Python, can produce and use various other data types that are more theoretical in nature, which can exist with similar characteristics among most programming languages. These data types are especially useful for simplifying certain algorithms, and can be easily implemented as we have been doing for the past few weeks.

For example, the first abstract data type we discussed was a stack, which was a type of list that had a last-in-first-out structure, such that adding to the stack would always append to the end, and only the last added item could be adjusted or removed. More recently, we've been working with trees, which is a data type that somewhat refers to other versions of itself to create a data tree consisting of a root node which can branch off into different directions, each node containing whatever object it requires depending on what you're using the tree for.

No matter what language you're using, these abstract data types exist in all of them and share similar functionality and uses, and can be incredibly useful for certain algorithms.

No comments:

Post a Comment