Thursday, November 7, 2013

Data Structures

Data Structure is the place to store data and information in memory of a computer. There are many common data structure already defined for programmers to use such as list, array, arraylist, tree, graph...Depending on the usages of data, the programmers choose what data structure can fit the best for their program. To help other people who is outside of computer science major, data structure is like a house or a building so you can live or put your stuffs in. You can have many rooms or kitchens you want and can be different from other's houses. But the same idea is you can live or store you stuff in your house. Moreover, your house also has the address to help other people identify where you live, so that they can reach you easily. In computer, data structure is stored in memory, we can find the data which are stored in the structure, we only need to look at the id of the structure.

this is an example of data structure

Also, depending on the types of program, the choice of data structure is very important. For example, some data structures can do a lot faster in sorting and slower in inserting or deleting data. Moreover, you can define your own data structure in your own way. But it takes a bit of time because you have to do all the functions to get access to your data structures.