Wednesday, March 30, 2016

Revisiting a Post - on Abstract Data Types, Linked Lists, and Memory

In my post on Thursday, February 11th, I said that I would learn more about hash tables, how linked-lists save memory, and data structures and sorts in general. After reading a lot more about data structures and efficiency (in Big O notation), I feel like I've learned enough to answer some questions.

From reading the WikiBook Data Structures, as well as perusing through many, many Harvard C50 videos, I know now that linked-lists generally simplify matters because data doesn't have to be stored contiguously. In addition, arrays have to have a preset size, so in order to grow arrays, they need to be completely copied to a larger array. which takes O(n) time, amortized to O(1) (since we do it 1/n of the time). However, linked lists can be dynamically resized. The main disadvantage to linked-lists is that searching elements takes O(n) time in the worst case, while it takes O(1) time in an array.

In addition, I learned about many other data structures, such as hash tables, red-black trees, and tries. Each has their own advantages and disadvantages, and often I've learned that there's a trade-off between time-complexity and space-complexity for data structures. In addition, in regards to sorting algorithms. I learned and became comfortable with all the standard algorithms taught in class such as bubble sort, insertion sort, selection sort, merge sort, and quick sort, but also learned about heap sort (another data structure I learned about was a heap), counting sort, and radix sort.

So in all, what's happened since the beginning of last February? I feel like every blog post I've made so far has shown a new subject that I learned about, or a new area that I'm interested in - and at the end of it all, I feel like I've done a pretty good job, on my own time, to learn some pretty interesting and useful material in this subject. I've taken the topics that we've learned in class and searched them up, so that I get more comfortable with them, but also because I have a desire to scratch more than the surface. In essence, I feel like this is the basis of learning - a desire to scratch beyond the surface. To find out what you're not being told. And I feel like I've embraced that, and learned immensely.

No comments:

Post a Comment