Data Structures Tutorial
Data structures are used to organize the data so that various operations can be performed on the data more effectively. Data structures make the programs more efficient. An efficient program is said to be that which solves the problem within its resource constraints that is space and time. The cost of the solution is the amount of resources that the solution consumes. Data structures are basically used for better organization of data and to manage storage. A data structure has the following three requirements:
- Space of each data item it stores
- Time to perform each operation
- Programming effort
Suppose we have an employee with his name “Stuart” and an id “122”. The name of the employee is of string data type and the id of the employee is of integer data type. This data of the employee can be organized as a record which will be named Employee. Now we can collect the data of different employees and can store it in Employee’s record in a file or in a data base by using data structure.