0% found this document useful (0 votes)
5 views

Data Structures Introduction

The document introduces data structures, defining them as methods for organizing and storing data efficiently, with examples including arrays, linked lists, stacks, queues, trees, and graphs. It classifies data structures into linear and non-linear types, highlighting the advantages of using data structures for organization and efficiency. Additionally, it discusses linked lists, their advantages and disadvantages, applications, and types, including singly, doubly, and circular linked lists.

Uploaded by

Prajwal Narute
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Data Structures Introduction

The document introduces data structures, defining them as methods for organizing and storing data efficiently, with examples including arrays, linked lists, stacks, queues, trees, and graphs. It classifies data structures into linear and non-linear types, highlighting the advantages of using data structures for organization and efficiency. Additionally, it discusses linked lists, their advantages and disadvantages, applications, and types, including singly, doubly, and circular linked lists.

Uploaded by

Prajwal Narute
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Introduction to DataStructures

Data Structures introduction:


A data structure is a special way of organizing and storing data in a computer
so that it can be used efficiently. Array, LinkedList, Stack, Queue, Tree, Graph
etc are all data structures that stores the data in a special way so that we can
access and use the data efficiently. Each of these mentioned data structures
has a different special way of organizing data so we choose the data structure
based on the requirement, we will cover each of these data structures in a
separate tutorials.

Data Structure Types :


We have two types of data structures:

1. Linear Data Structure


2. Non-linear Data Structure

Linear data structures: Elements of Linear data structure are accessed in a


sequential manner, however the elements can be stored in these data structure
in any order. Examples of linear data structure are: LinkedList, Stack, Queue and
Array

Non-linear data structures: Elements of non-linear data structures are stores


and accessed in non-linear order. Examples of non-linear data structure are:
Tree and Graph

Data Structure Classification

www.vectorindia.org 1
Introduction to DataStructures

Advantages of DataStructures

We need data structures because there are several advantages of using them,
few of them are as follows:

1.Data Organization: We need a proper way of organizing the data so that it can
accessed efficiently when we need that particular data. DS provides different
ways of data organization so we have options to store the data in different data
structures based on the requirement.

2.Efficiency: The main reason we organize the data is to improve the efficiency.
We can store the data in arrays then why do we need linked lists and other data
structures? because when we need to perform several operation such as add,
delete update and search on arrays , it takes more time in arrays than some of
the other data structures. So the fact that we are interested in other data
structures is because of the efficiency.

Introduction to Linked Lists


Linked List is a very commonly used linear data structure which consists of group of
nodes in a sequence.
Each node holds its own data and the address of the next node hence forming a
chain like structure.
Node :

www.vectorindia.org 2
Introduction to DataStructures

As per the above illustration, following are the important points to be considered.
Linked List contains a link element called first.
Each link carries a data field(s) and a link field called next.
Each link is linked with its next link using its next link.
Last link carries a link as null to mark the end of the list.

Advantages of Linked Lists

 They are a dynamic in nature which allocates the memory when required.
 Insertion and deletion operations can be easily implemented.
 Stacks and queues can be easily executed.
 Linked List reduces the access time.

Disadvantages of Linked Lists

1. The memory is wasted as pointers require extra memory for storage.

2. No element can be accessed randomly; it has to access each node sequentially.

3. Reverse Traversing is difficult in linked list.

Applications of Linked Lists

 Linked lists are used to implement stacks, queues, graphs, etc.


 Linked lists let you insert elements at the beginning and end of the list.
 In Linked Lists we don't need to know the size in advance.

www.vectorindia.org 3
Introduction to DataStructures

Types of Linked List


Following are the various types of linked list.
1. Simple or Singly Linked List−Item navigation is forward only.
2. Doubly Linked List− Items can be navigated forward and backward.
3. Circular Linked List− Last item contains link of the first element as next and the
first element has a link to the last element as previous.

Note :
Reference Books : Taken contents and diagrams from various websites.

www.vectorindia.org 4

You might also like