Data types

Data types are classifications or categories that define the data that can be stored, processed, and manipulated by computer program or system. They define the type of value the variable can hold, the operations that can be performed on that data, and the space in memory to store that data.

DATA STRUCTURE

Once data is stored in a variable, we need a mechanism to manipulate such data to solve problems or perform tasks. This is where data structure comes in. Data structures provide a way to organize and store data so that it can be accessed, manipulated, and modified efficiently. Some common data structures are: Arrays, Linked lists, Set, Queues.

Classifications of data structures

Data structures can be classified into two:

1. Linear data structure

2. Non-linear data structure

Linear data structure:

In this data structure, data is stored in linear order. Data in these structures have a linear relationship between them, where each element is connected to the next in a sequential manner. E.g., arrays, linked lists, queues, stacks, etc.

Non-linear data structure:

In this type of data is stored in a Non-linear way. There is a non-linear relationship between elements in this data structure, each element can be connected to multiple other elements, this connection can be very simple or can be complex. E.g., graph, trees, hash, heaps.