Sunday, November 3, 2013

Why learn data structures?

Data Structures
Image Source
Knowingly or unknowingly, we store many things in our daily routine life. For example, think about books, clothes, kitchen utensils, food and many other small things. We store books in bookshelves, clothes in closets, kitchen utensils in kitchen cabinets and food in plastic bags or containers. For all different things, we have different items which help to store those things. But have you ever wondered how does Google store their data? How Google manages to narrow down the best results from millions of other results? Well, the answer is quite simple - through data structures. In computer science, data structures are methods of storing data in computers so that it can be found and retrieved quickly when needed. In any programming language, data structures are implemented using references, data types and operations on them. Some of the most common and important data structures are as follows:
Image of different data structures
Image Source

- Array
- Linked Lists
- Trees
- Stacks
- Queues
- Graphs
These data structures are solution to organize data efficiently in computers. Without sufficient knowledge of data structures, it is often easy to think of solutions in terms of data structures which are provided by programming language libraries. For example, if you were a Java programmer, then you would think of java.util for solutions. But it does not help every time. Imagine if you were writing a basic program with “auto-correct” feature, where a user types something incorrectly and your program corrects user error automatically. Well, the knowledge of data structures provided by libraries does not help much, but knowledge of a simple tree would help you here.

Overall, I believe that it is important to learn data structures because it is a skill which can be useful to understand and conclude an algorithm for a problem. It is helpful to analyze the difficulty of any problem and know which algorithm works best to solve that problem.

Sources:

2 comments:

  1. hi, nirav, you wrote friendly and organized very well with examples. I agree that data structure is very good solution to manage data but we should figure it out that what algorithm we have to use based on what type of data. when I took data structure, i was used to most of important trees and arrays. it was really hard to study but after class, I could understand about data structure. we should learn data structure as many as we can. this is informative post!

    ReplyDelete
  2. Hi Nirav,I love the picture you gave that layout the different data structures and how they look relative to each other. I think the auto correct feature is a very interesting problem. You need to be able to pull up the possibilities for each word and then pull up the possibilities that are available after each letter that is typed afterwards. This makes it a very interesting problem that I'm sure is tackled using data structures and algorithms. I look forward to reading more about your thoughts on this subject.

    ReplyDelete