Data Structure
Notes
“Covers Arrays, Memory Layouts,
1D/2D, and More…”
By Mehak
, Index
SR. NO TITLE
Introduction to Data structure and algorithm
1.
Arrays Introduction
2.
One-Dimensional Array
3.
4. Two-dimensional Array
Introduction to “Types of Operation on Arrays”
5.
1
, Data Structures and algorithm
Definition:
A data structure is a special way of organizing and storing data in a computer so that it can be used
efficiently. It provides a particular layout or format for arranging data so that different operations
like storing, accessing, updating and deleting data can be done easily and quickly. Instead of
handling data randomly, data structures help us manage and use data in a more logical and
structured way.
In simple words, a data structure is like a container where data is stored in a specific format
depending on what we want to do with that data. Different types of data structure are designed for
different kinds of tasks. For example, if we want to store data in a sequence, we can use an array or
a list. If we want to manage data in a way where we always access the most recently added item
first, we can use a stack. Similarly, for storing data in a key-value format, we use hash tables.
Some common types of data structures include arrays, linked lists, stack, queues, trees, and graphs.
Each one has its own features, advantages, and use cases. Choosing the right data structure for a
task is important because it directly affects the performance and efficiency of a program.
Data structure can be classified into twomain categories:
Data Structure
Linear Non- Linear
In data structures, we organize data in different ways depending on how we want to access and
manage it. Based on the arrangement of elements, data structures are mainly divided into linear
and non-linear types.
Linear Data Structures :
A linear data structure is one where all elements are arranged in a sequential order, one after the
other. In simple words, data is organized in a straight line, and each element is connected to the one
before and after it (except the first and last). This type of structure makes it easy to traverse (move
through) the elements one by one.
2