Can
you imagine what would happen to our bedroom if we do not have closest or
storage? Our cloths would be all over our bedroom. Speaking from an experience,
finding important things in an unorganized room will be a great challenge, and
one would be spending their valuable time on something useless. Similar logic
applies to programming. Data structures in programming work as a closet or storage
to store and retrieve data efficiently.
Why should you
care about Data Structures?
Now,
you might be wondering “why should you care about data structures?” Answer to
this question might be different depending on your interests. If you are not
planning to learn programming, then you may never have to learn various data structures.
However, if you want to be an excellent programmer or pursue a career in
Computer Science (because you are awesome!), then you must have to learn
different data structures.
Examples of different data structures |
Importance of
Data Structures
Data
structures’ most important features are efficiently storing, searching,
retrieving and traversing the data. Attributes of data structures make them
very useful and an essential tool in programming. According to one my Computer
Science professor, “data structures serves as a heart of every application.”
For instance, if you are building GUI applications and following MVC patterns, then you need to figure out which data
structure will you use for your model. In addition, almost all algorithms rely
on the correct choice of data structures to get the best running time. For
instance, if you run some specific algorithm and change the underlying data
structure of the algorithm, then you may find that algorithms running time
drastically increases. Lastly, use of data structures in programming make codes
very readable.
How to learn
Data Structures?
Since
data structures are very essential tools for programming, most of the
well-known companies tend to ask interview questions based on data structures.
Often interviewee tends to stumble upon those questions, and loses their dream
jobs. So, what is the best practice to learn data structures? According to
Robert Love, Software Engineer and interviewer at Google, one should visualize
the data structures. He recommends “Intuitively understand what the data
structure looks like, what it feels like to use it, and how it is structured
both in the abstract and physically in your computer’s memory.” Another
important thing to focus on while studying data structures is to understand
when to use that particular data structure. The reason behind that is every
data structures is designed to achieve certain things efficiently, but that
same data structure would be very inefficient at achieving other tasks. For
instance, arrays, the most basic data structure, are good for retrieving data
at given location (it takes O(1)), but arrays running time drastically
increases for removing data from the middle of the array.
I
hope you enjoyed my post about data structures and learned something new from
this post. I am looking forward to hear your suggestions in comments.
References:
http://s.radar.oreilly.com/wp-files/5/2013/03/redis-data-structures.png
Hi, Jay,
ReplyDeleteYour blogs always give me useful information. In first paragraph, you use an interesting example to show what the data structures are in real life and their importance. In second paragraph, you explain the reasons why data structures are important in Computer Science. In last paragraph, you also tell readers how to learn data structures. The whole article lets me understand data structures more.
Your images in this post also help you clarify your purposes.
It is said that Computer Science is composed of data structures, algorithms and programming language. I am learning and using them to work on my projects.
Any way, it is an informative and interesting post. I like it.
Hey Jay!
ReplyDeleteWow, this was a very informative and engaging post. I love how you relate closets to data structures in the beginning. I especially enjoyed the “How to learn Data Structures?” section. Great advice! I definitely agree that it’s extremely helpful to visualize the data structure and understand when it’s useful in an application. When I was learning data structures, I was easily able to implement those I visualized in my head. I don’t remember the ones that I didn’t/couldn’t visualize or apply so I should probably review them sometime in the future.
Overall, I enjoyed reading your post. Great job and I look forward to reading more your posts.
Good summary of what data structures are and how they are related to computers. Knowing the different types of data structures and how to use them efficiently definitely helps in making a programmer great.Though it's true that selecting the right data structure for your application is crucial it is also very important to know as many as you know
ReplyDeleteHello Jay,
ReplyDeleteI found this post to be incredibly informative! I especially liked the similes used in the first paragraph to show why data structures are important. The visuals you provided are good because they allow me to see what you are actually talking about, instead of having to read some long, convoluted textbook explanation of the algorithms. However, you have some noticeable grammar and spelling errors that detracted from the post, such as misspelling "clothes" near the beginning and using "do" instead of "did" in the first sentence. I agree with the fact that you must know a variety of data structures in order to use them efficiently, and choosing the right one for a task is a big step forward. Hope to see more from you in the future!