DEV Community

ryan cooper
ryan cooper

Posted on

Intro to Data Structures & Algorithms

What are Data Structures?

Data Structures are exactly what they sound like--structures that hold data on our computer. More formally, they're specific implementations of abstract data types. Wait...wtf are abst-

Quora Advanced Explanation
Uhhhh too hard for my brain...Let's keep looking.

Quora ELI5 Explanation
Okay. I can work with this.

Abstract Data Types?!

Abstract Data types are menus that tell you what you can ask for.

Data Structures are chefs that build your chosen menu items for you.

For example, if I want a burger with ketchup, tomatoes, and mustard, I might call this person to make it.

If I want something where each new item is added to the front and the last items in are the first items out (LIFO), I might call a stack to implement it.

Conclusion

Data structures are really important for programmers to understand because they're the cars, buses, and trains that move our data through our programs.

And just like cars, buses, and trains, they all have tradeoffs. Choosing to use a linked list in place of a hash table could save you as much time as choosing to take the subway instead of driving through rush hour traffic. But you wouldn't know that unless you took the time to learn them!

Sources

Top comments (0)