0% found this document useful (0 votes)
3 views3 pages

Types of Data Structures Explained

Uploaded by

vishuwagh48
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)
3 views3 pages

Types of Data Structures Explained

Uploaded by

vishuwagh48
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

Q1: Write down the types of data structure

1. Linear Data Structure:

Data elements are arranged in a sequence, one after another.

Example: Array, Stack, Queue, Linked List

2. Non-Linear Data Structure:

Data elements are connected in a hierarchical or network form, not in a sequence.

Example: Tree, Graph

3. Hash-based Data Structure:

Data is stored in key–value pairs for quick access using a hash function.

Example: Hash Table, Hash Map

4. File/Data Storage Structure:

Used to store data permanently on storage devices.

Example: File Organization, Indexing

Q2: Write down the types of linked list

1. Singly Linked List –

Each node has data and a link to the next node only. Traversal is possible in one direction.

2. Doubly Linked List –

Each node contains data, a pointer to the next node, and a pointer to the previous node. It allows
two-way traversal.

3. Circular Linked List –

The last node connects back to the first node, forming a circle. Traversal can continue endlessly.

4. Circular Doubly Linked List –

Similar to a doubly linked list, but the first and last nodes are linked to each other in both directions.

5. Header Linked List –


A special linked list that contains an extra node called the header node at the beginning to store
information like list length or starting address.

Q3: Write down the types of arrays

1. One-Dimensional Array –

Stores elements in a single row or line.

Example: int a[5];

2. Two-Dimensional Array –

Stores elements in rows and columns (like a matrix).

Example: int a[3][3];

3. Multi-Dimensional Array –

Has more than two dimensions; used for complex data representation.

Example: int a[3][3][3];

4. Jagged Array –

An array of arrays where each inner array can have a different length.

Example: Different row sizes in a 2D array.

5. Dynamic Array –

Size can change during program execution.

Example: ArrayList in Java, Vector in C++.

Q4: Define the following terms:

1. Array:

An array is a collection of elements of the same data type stored in contiguous memory locations.

It allows random access to elements using an index.

Example: int a[5] = {1, 2, 3, 4, 5};

2. Linked List:

A linked list is a collection of nodes, where each node contains data and a pointer (link) to the next
node in the sequence.
It allows dynamic memory allocation and easy insertion or deletion of elements.

Example: A chain of nodes connected by links.

You might also like