Chapter 1: Introduction to Data Structures
What is Data Structure ?
Data structure is a way of collection and organizing the data in such a way that operations on these data can be performed in efficient way. Data structure also helps in efficient storage and retrieval of data. It represents how data is organized in computer memory.
Example:
We have student records name “Ram”, age 20 and name “Shyam”, age 22. We can store these records in database or file as a data structure.
Types of Data Structures
- Primitive Data Structures
- Non-Primitive or User Defined Data Structures
It includes Boolean, Byte, Char, Double, Float, Int, Long, Short
It includes Array, structure, union, files, linked list (linear lists: stacks, queue; Non-linear lists: Trees, Graphs)
We will discuss the following Data Structures one by one in the coming chapters.
- Stacks
- Queues
- Linked Lists
- Trees and Graphs