A blog for specific technical topics for my CS100W class at San Jose State University.
Sunday, November 3, 2013
Data Structures: What are they for?
'A data structure is a group of data elements grouped together under one name. These data elements, known as members, can have different types and different lengths.' (Read more at: http://www.cplusplus.com/doc/tutorial/structures/). And what this basically means is that a programmer can create a single object to hold a bunch of different types of things in one place. And a good example of this kind of data structure would be the files you use on your computer as that is something that you interact with in your everyday life. The data structure aspect comes from the way in which your files store all kinds of information about themselves in addition to what you or somebody else put into them, like the date, or title/artist/duration of a music file.
Data structures are also used in another way to help programmers make their lives simpler by hiding away the implementation details. And an example of this could be the way in which your music playing program uses a list data structure to hold all of your music files. And by using this type of data structure the people who write music playing programs can easily add features to allow you to sort your music in a bunch of different ways without worrying about the implementation details about a list by just adjusting the sort function their list data structure uses to be able to sort your songs in alphabetical order by artist or track name, or by the amount of times you played a song so you can easily play your favorite song.
Subscribe to:
Post Comments (Atom)

Hi Luke,
ReplyDeleteYour blog is detailed and clearly describe what data structure is. You simple examples which link to our daily life make the reader easy to understand the data structure’s concept. From your vivid explanation, the readers who are not in the computer field will get what you want to say. The thing you should make attention is your grammar. The best way is to go through your blog before you upload to the blog to prevent from grammar mistakes.
Thanks for the comment Yibei, I went ahead and read through the post again to improve its grammar.
DeleteHi Luke,
ReplyDeleteNice post. Well explaining what data structure is and the benefits of data structure. Data structures are very important for a program; therefore, to judge a program good or bad sometime depends on the selected data structures. A right data structure can also make you easier coding.