Data Structures - What are data structures?

What Are Data Structures?

If you’ve ever been to The Container Store, you know it’s one of those places your mom would take you to as a child that would be super boring, but then becomes a playground of magic as you age into adulthood. 

All the beautiful varieties of containers for things you never even thought of before. You dream about turning your home into an ad from Better Homes & Gardens magazine and the ease of finding anything and everything you own through a clear, plastic bin.

If only we could organize mass amounts of data stored online just as easily as we do our shoes and kitchen utensils. Oh wait. We can. Lucky for us, we have data structures to organize all of the information to make it incredibly easy to store and find later. Data structures are The Container Store’s equivalent of processing data.

How Do Data Structures Work?

But what exactly is a data structure? Data structures are an organization tool used to input, process, maintain, and retrieve data. They allow you to organize data to then later do something with it. The algorithm in a program will enable you to manage said information. Data structures and algorithms puzzle piece each other. 

The Different Types of Data Structures

Not all data structures are created equal. Like many different types of gorgeous containers at The Container Store, there are different types of data structures for all your different data needs.

Four of the most common types of data structures are:

  1. Queues — Work like any line we form at the store. First person in line is the first person served. First in, first out.
  2. Arrays A fixed list of objects or values. You can use arrays to transverse, search, or update elements in an index.
  3. Stacks — Last in, first out, much like an undo button or the back button. Like you’re working on washing a pile of plates.
  4. Trees — One or more data nodes and are hierarchical in their system.

Four more types of less commonly used data structures are:

  1. Linked list — A structure that has a specific sequence of items that are all also linked to each other.
  2. Hash Tables — A structure that has certain keys associated with different values. This is extremely useful for finding specific information from large amounts of data. The category of tree can also be broken down into binary trees, binary search trees, heaps, and treaps.
  3. Graphs — Has nodes and edges that connect to the nodes. These are helpful for social media, search engines, and GPS uses. 
  4. Heaps — A special binary tree where the parent nodes and their children are compared according to value. Within heaps, there are also more specific min heaps and max heaps.

Learn How to Create Data Structures

What is the point of having any of these data structures at all? Why not throw structure out the window and live in chaos? Well, you could. But too much confusion and information spread out everywhere is bad for business. You can save yourself the time and heartache of finding the information you need quickly by finding the best data structure for you. So take the time to do your spring cleaning now and thank yourself (and your data structures) later.

Get hands-on practice with over 100 data structures and algorithm exercises with Udacity’s Data Structures and Algorithms Nanodegree. You’ll learn to evaluate and assess different data structures and algorithms and implement a solution based on your design choices.

Start Learning

Jennifer Shalamanov
Jennifer Shalamanov
Jennifer is a content writer at Udacity with over 10 years of content creation and marketing communications experience in the tech, e-commerce and online learning spaces. When she’s not working to inform, engage and inspire readers, she’s probably drinking too many lattes and scouring fashion blogs.