Eli5: explain data structure from computer science to a non technical person.

883 views

How do I explain what is data structure to someone who has never programmed before?

In: 15

17 Answers

Anonymous 0 Comments

Ok so you got a whole stack of cups. Different sizes, colors, some plastic, some glass, some skinny, some fat. All in one big stack.

You want one in particular. How do you describe it? Well say you want a cup that’s large, blue, plastic, and skinny.

How do you find it? You could go through each one and ask if it’s the cup you want. Or you could start by eliminating all the non-large, non-blue, non-plastic, non-skinny. Then you’d be left with what you can choose from.

Easy to do with 50 cups, now imagine an insanely large amount of cups. Like 10 million. And you want one.

How can you do that efficiently? Well you need to sort them by their attributes. You’d make a table where you’d say each cup has a number (called a key) and in that row you’d have each attribute type. Each type can have a subset of attributes like plastic shiny vs plastic matte and that would be a matrix in the attribute.

That’s data structure. Logically defining your attributes.

You are viewing 1 out of 17 answers, click here to view all answers.