Saturday, November 2, 2013

Data Structures: What Are They and Are They Really That Important?

Data is everywhere! It doesn’t take a genius to figure out that the data must be structured in some way. If it wasn’t…NO! Don’t even go there. If you are dealing with data, you better be dealing with the right data structures too. What are data structures?  Simply, “a data structure is a format for organizing and storing data” (Rouse) so that the data can be used efficiently.

There are many different types of data structures that you can use depending on the application.  The following are a few of the more popular ones with their advantages and disadvantages.

Array: This data structure is used to collect numerous elements in a specific order. The advantages include fast access if the position of the element is known and quick inserts. The disadvantages include slow searches and deletes.

Linked List: This is one of the most common data structures. Essentially, linked lists are kind of like arrays in the sense that you have an ordered set of data elements. What’s different? Well, each element has link to its successor and sometimes its predecessor. Use this data structure if you want quick inserts and deletes. One negative aspect of using this structure is slow searches.

Hash Table: This is my absolute favorite data structure! The hash table is used to implement an associative array (a structure that maps keys to their values. If you have a large quantity of data, then you can use this to search that data in O(1) time! The drawback is that the insertion and deletion times are somewhat larger than other data structures.


 There are so many more data structures: Stack, Queue, Binary Tree, Red-Black Tree, Heap, Graph and the list goes on. I recommend that you become familiar with all of them since knowing them will give you a good idea of what data structure is best for your application. Data structrue questions also come up A LOT in interview questions. In my opinion, one of the best books to learn and understand data structures is Introduction to Algorithms by Cormen, Leiserson, Rivest, and Stein. Another alternative book is Data Structures and Algorithm Analysis in Java by Mark A. Weiss.

In conclusion, I hope your answer to the second question in the tile is a big fat YES!


Other Works Cited
Cormen, Thomas H. Introduction to Algorithms. Cambridge, MA: MIT, 2009. Print.
Quora. "How Do I Strengthen My Knowledge Of Data Structures And Algorithms?" Forbes. Forbes Magazine, 03 July 2013. Web. 02 Nov. 2013. <http://www.forbes.com/sites/quora/2013/07/03/how-do-i-strengthen-my-knowledge-of-data-structures-and-algorithms/>.
Rouse, Margaret. "Data Structure." SearchSQLServer. N.p., Feb. 2006. Web. 02 Nov. 2013. <http://searchsqlserver.techtarget.com/definition/data-structure>.
 

3 comments:

  1. Sindhu,
    Excellent blog! I like the overall presentation and flow of your post. it is very conversational and informative. Your descriptions about Arrays, linked Lists, and Hash Tables are brief and appropriate. I like the ending where you talk about the importance of Data Structure in interview questions. Also, the books you mentioned further strengthen your blog!
    Good job and happy blogging!

    - Tushar

    ReplyDelete
  2. Sindhu,

    Thanks for not making your blog read like an essay. Since I procrastinated commenting and have to do all ten today, it was nice reading something that wasn't boring.

    Your post is really clearly structured and doesn't feel like you're reaching for connections. Including the advantages and disadvantages was super useful, since those differences are what influence someone to choose one data structure over another

    ReplyDelete
  3. Great blog post introducing the reader to Data Structures! I like how you go across the point of the different ways to measure efficiency. One thing that would be helpful in your blog post would be a link to some other source of information so that the reader can go and expand from what they have read in your blog. Keep it up!

    ReplyDelete