Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Data structure and algorithm[basics for interview]

Rating
-
Sold
-
Pages
3
Uploaded on
09-11-2023
Written in
2022/2023

Data structure and algorithm is an importan topic where from this topic questions will be asked in the interview for IT companys.

Institution
Course

Content preview

What is Data Structure?
Data structure is a way to store and organize data in the main memory so that the
data can be accessed and modified in an efficient way. Data structures are
classified into two categories: linear data structure and nonlinear data structure.

Linear Data Structure
In a linear data structure, the data items or elements are arranged in a linear
fashion meaning they are arranged in a sequential manner and each element is
connected to the element in front of it and to the element behind it. The example
of linear data structures are:

Array
Queue
Stack
Linked List
Nonlinear Data Structure
In a nonlinear data structure, the data items or elements are not added in a
sequential manner. Examples of nonlinear data structure are:

Trees
Graphs
Array
Array is a collection of data items that are of the same type. It is a linear data
structure, and its data items are stored sequentially in the memory. Arrays are
also static in nature since they are always fixed in size.

Multidimensional Array
A multidimensional array is also known as an array of arrays, meaning we can store
many arrays inside an array. 2D array or two-dimensional array and 3D array or
three dimensional array are considered as multidimensional arrays.

Linked List
Linked list is a linear data structure and it consists of a group of nodes where
each node contains a data field to store data and an address field to store the
address of the next node which is also known as a pointer. It forms a chain-like
structure. In a linked list, the first node is referred to as head and the last
node is referred to as a tail and points to null value. A linked list is also
dynamic in nature.

Doubly Linked List
Doubly linked list is a linked list containing an extra pointer on every node which
points to the previous node. The advantages of a doubly linked list over a singly
linked list are:

It can be traversed in both directions.
Deletion operation is faster in doubly linked list.
Applications of Linked List
Some of the common applications of the linked list are:

Used for implementation of stacks and queues.
Used for maintaining the directory names in an operating system.
Used in image viewer software to navigate through the image using the next and
previous button.
Used in music players.
Stack
Stack is a linear data structure that follows a particular order known as LIFO
(Last In First Out) where the last element that was inserted will be the first one
to be removed. Insertion and deletion operations are done only from the top of the
stack.

Written for

Course

Document information

Uploaded on
November 9, 2023
Number of pages
3
Written in
2022/2023
Type
Class notes
Professor(s)
Jeevanantham
Contains
Data structure and algorithm

Subjects

$10.98
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
sivagaminathan

Get to know the seller

Seller avatar
sivagaminathan Self
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
2 year
Number of followers
0
Documents
1
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions