Introduction to Data Structures

--

Data Structure is a way to store data and arrange in such a way that any work can be perform on it very efficiently as a single unit or block.

Data Structure is the one of the important concepts in computer science and programming it is used almost in every field of CSE like operating system, Artificial intelligence, Data science, graphs, image processing.

The main background idea behind the use of data structure is to reduce storge and time complexity of many things.

Let’s assume an example to understand the Data structures.

You have to arrange marks of student which contain Name, UID and Marks Now, we know that Name “Muskan” is String datatype UID “9282” is integer datatype and Marks “98.8” is Float data type hence we can store or arranged the data into a file with the help of Data structures.

Types of Data Structure –

Primitive Data Structure or Simple data structure – Those Data structure which are built from basic data types like Integer, Character, Boolean and other they all comes under Primitive Data Structure

  • Array
  • String

Non-primitive Data Structure or Compound data structure- Those Data structure which are built from combination of different Primitive Data structure to from one Compound Data structure.

  • Stack
  • Queue
  • Linked list
  • Tree
  • Graph

These Non-primitive Data Structure is divided into two parts

  • Linear Data Structure- These Data Structure are single level data structure.
  • Stack, Queue, Linked list

• Non-Linear Data Structure- These Data Structure are two or more than level of data structure

Tree, Graph

Different Data Structures

Array-

Array is block of memory in which same type, nature of elements is stored into it. Data is stored in a continuous format

➢ int array [10];

String-

String is just an array of character.

➢ char string [10];

Stack –

Stack is a data structure which follow its principal LIFO which is Last IN In First Out . It is linear data structure. In stack insertion and deletion takes palces from one end only which is top end.

Queues-

Queues is also a linear data structure. it works on the principal FIFO which is First in First Out. Insertion takes place from the rear end whereas deletion takes place from front end of Queues.

Linked lists-

It is a linear data structure. Linked lists is special types of lists which connect to another list. These lists contain INFO which stores the information NEXT which connect to another list and PREV which connect to Backend list.

Types of linked list

➢ Singly Linked list

➢ Doubly Linked list

➢ Cricular Linked list

Trees-

Tress is multilevel data structure having a hierarchical relationship among the elements which is known as nodes. The uppermost nodes of knowns as roots whereas lowermost nodes are leaves.

Types of trees-

➢ Normal trees

➢ Binary trees

Reference –

• Geek for geek- https://www.geeksforgeeks.org/data-structures

• Javat point- https://www.javatpoint.com/data-structure-tutoria

• Simplilearn – lhttps://www.simplilearn.com/tutorials/data-structure-tutorial/what-is-data-structur

• Wikipedia- ehttps://en.wikipedia.org/wiki/Data_structur

• Programiz – ehttps://www.programiz.com/dsa/data-structure-types

Yayyy! Now you’re done with basics of data structures!

--

--