Story of Data Structure
A data structure is a way to arrange data in a computer in an effective manner. For instance, In array data structure, we can store a list of items with same data type.
What is Algorithm?
A algorithm is a process or set of rules to be followed to execute any calculations or other problem-solving operations, especially by a computer.
What is Data?
Data is a set of values of qualitative or quantitative variables about one or more persons or objects.
- Atomic − Definition should define a single concept.
- Traceable − Definition should be able to be mapped to some data element.
- Accurate − Definition should be unambiguous.
- Clear and Concise − Definition should be understandable.
Data Structures divided into two parts.
- Primitive data structure
- Non-primitive data structure
Primitive Data structure
The primitive data structures are predefined types of data. The int, char, float, double, and pointer are the primitive data structures that can hold a single value.
Non-Primitive Data structure:
Non-primitive data types are not defined by the programming language, but are instead created by the programmer.
The non-primitive data structure again divided into two types:
- Linear data structure
- Non-linear data structure
In Linear Data Structure the arrangement of data in a sequential manner is known as a linear data structure. For example: Arrays, Linked list, Stacks, and Queues. In these data structures, one element is connected to only one another element in a linear format. Whereas one element is connected to the ’n’ number of elements known as a non-linear data structure. The best example is trees and graphs. In this case, the elements are arranged in a random manner.