Basic of Data Structures

Sunidhi Singhal
Thrive in AI
Published in
2 min readFeb 25, 2022

A data structure is a particular technique of organizing data in a computer so that it can be used effectively.

Data Structure is of two types: Primitive Data Structure and Non-Primitive Data Structure.

Primitive Data Structure

Data Structure has a predefined way of storing data. It stores data of only one type. For Example Integer, Float, Characters, Pointers and others.

Non-Primitive Data Structure

Data Structure has a user-defined way of storing data. There are two types of Non-Primitive Data Structure: Linear(sequential) and Non-Linear (non-sequential) Data Structures. Array, Stacks, Queue and Linked List are a few Linear Data Structures. Graphs and Trees are Non-Linear Data Structures.

You can refer to the below table for referring to different kinds of data structures.

In different situations, we prefer a particular data structure depending on the scenario. For instance, for retrieving a value, the array is better than a linked list. But for deleting a value, a linked list is preferred over the array.

If data is arranged effectively, it can be accessed in a faster way. This was the basics of Data Structure. Hope you had a good read!

--

--