Saturday, November 2, 2013

Data Structures: Good for more than just Big Data

Trees, B-trees, AVL trees, lists, queues, stacks, heaps, leftists-heaps...  Merge sort, bubble sort, insertion sort, quicksort...  Good times.  Learning all these in my CS 146 class (Data Structures and Algorithms) was the most fun part of my programming career so far.  But when I was finished with the class, I just couldn’t see where I’d actually be using the knowledge in every-day coding.  I mean, of course it would help me decide between using a language’s library version of a linked list, or a hashmap, or a tree in different scenarios.  But we could have learned that in a week or two, without going in depth.  Why learn exactly how quicksort works?

Van Gogh's "Starry Night"
It’s the same reason an aspiring painter studies Van Gogh.  A programmer today will never have to implement the genius structures and algorithms that are out there (...it’s already done).  Understanding how they work, however, helps you become a better thinker.  We analyze the work of the most clever problem-solvers out there in hopes of becoming better solvers ourselves.


If that’s not good enough, there’s more pressing motivation to learn data structures.  Employers want to know that you understand how your tools work.  Interviewees will almost certainly face questions about data structures.  This link has some of the most popular data structure-related interview questions.  Keep sorting!

3 comments:

  1. Hi, Andres,
    I agree with you that learning data structures can let you be a better thinker and answer the interviewers' questions. Actually, I am the one who wants to know about the basic knowledge about computer architecture, programming paradigm, data structures and algorithms. When I first touched the computer, I was shocked by its' all kinds of functions. From then, I decided that I had to select Computer Science as my major. So, I like CS146 and CS152. The two courses solved many questions which kept running in my brain for a long time.

    Your discoursed impressively your understanding with us on this subject. When I read your article, I feel that I am sitting on one seat to listen to your speaking. It is a good post. Thanks for your sharing.

    ReplyDelete
  2. Hi Andres,
    The first thing I noticed in your post is the picture. The posts that I have seen so far (including mine) have pictures of (or something related to) data structures, but yours is different. I like that. Instead of routinely explaining what data structures are and how to use them, you focused on the motivation behind learning data structures, which many of us lack these days. I hope people get motivated to understand data structures after reading this post. Good job!

    ReplyDelete
  3. HI Andres,

    Nice post. I totally agree with your view points. Before taking CS146, I think most of us already learned bubble sort, insertion sort, etc. But we couldn't remember a lot since we don't use them often. As a programer, thinking is very important.

    ReplyDelete