Imagine clothes as being like data. We have dressers for storing clean clothes that need to be folded and we have closets for storing clean clothes that need to be hung up. We also have laundry hampers to store dirty clothes that need to be washed. The way you put clothes into them, the way they’re stored and the way you get the clothes out can all vary, but all three are just containers for storing clothes.
Similarly, data structures are just containers for storing information. And just like our containers for clothes, there’s many different kinds of data structures that provide different ways of putting the data in, storing it or taking it back out, depending on your needs.
Latest Answers