Algorithms Tutorial - GeeksforGeeks
Algorithms Tutorial - GeeksforGeeks
DSA Algorithms Analysis of Algorithms Sorting Searching Greedy Recursion Backtracking Dynamic Programming
What is an Algorithm?
An algorithm is a finite sequence of
well-defined instructions that can be
used
We use cookies to ensure tothe best
you have solve a experience
browsing computational
on our website. By using our site, you acknowledge that you have read and understo
https://www.geeksforgeeks.org/fundamentals-of-algorithms/ 3/19/25, 2 58 PM
Page 1 of 12
:
structure:
1. Analysis of Algorithms
Analysis of Algorithms is the process
of evaluating the efficiency of
algorithms, focusing mainly on the
time and space complexity. This helps
in evaluating how the algorithm's
running time or space requirements
grow as the size of input increases.
https://www.geeksforgeeks.org/fundamentals-of-algorithms/ 3/19/25, 2 58 PM
Page 2 of 12
:
2. Mathematical Algorithms
Mathematical algorithms are used for
analyzing and optimizing data
structures and algorithms. Knowing
basic concepts
like divisibility, LCM, GCD, etc. can
really help you understand how data
structures work and improve your
ability to design efficient algorithms.
3. Bitwise Algorithms
Bitwise algorithms are algorithms
that operate on individual bits of
numbers. These algorithms
manipulate the binary representation
of numbers like shifting
bits, setting or clearing specific
bits of a number and perform bitwise
operations (AND, OR, XOR). Bitwise
algorithms are commonly used in low-
level programming, cryptography,
and optimization tasks where efficient
manipulation of individual bits is
required.
4. Searching Algorithms
Searching Algorithms are used to find
a specific element or item in a
collection of data. These algorithms
https://www.geeksforgeeks.org/fundamentals-of-algorithms/ 3/19/25, 2 58 PM
Page 3 of 12
:
are widely used to retrieve data
efficiently from large datasets.
5. Sorting Algorithms
Sorting algorithms are used
to arrange the elements of a list in
a specific order, such as numerical or
alphabetical. It organizes the items in a
systematic way, making it easier to
search for and access specific
elements.
6. Recursion
Recursion is a programming technique
where a function calls itself within its
own definition. It is usually used to
solve problems that can be broken
down into smaller instances of the
same problem.
https://www.geeksforgeeks.org/fundamentals-of-algorithms/ 3/19/25, 2 58 PM
Page 4 of 12
:
Guide on Recursive Algorithms
Practice Problems on Recursion
algorithm
Top 50 Problems on Recursion
Algorithm for Interview
Quiz on Recursion
7. Backtracking Algorithm
Backtracking Algorithm is derived
from the Recursion algorithm, with the
option to revert if a recursive solution
fails, i.e. in case a solution fails, the
program traces back to the moment
where it failed and builds on another
solution. So basically it tries out all the
possible solutions and finds the
correct one.
https://www.geeksforgeeks.org/fundamentals-of-algorithms/ 3/19/25, 2 58 PM
Page 5 of 12
:
Guide on Divide and Conquer
Algorithm
Practice problems on Divide And
Conquer algorithm
Quiz on Divide and Conquer
9. Greedy Algorithm
Greedy Algorithm builds up the
solution one piece at a time and
chooses the next piece which gives the
most obvious and immediate benefit
i.e., which is the most optimal choice
at that moment. So the problems
where choosing locally optimal also
leads to the global solutions are best
fit for Greedy.
https://www.geeksforgeeks.org/fundamentals-of-algorithms/ 3/19/25, 2 58 PM
Page 6 of 12
:
Dynamic Programming Guide
Practice Problems on Dynamic
Programming
Top 50 Dynamic Programming
Coding Problems for Interviews
Quiz on Dynamic Programming
https://www.geeksforgeeks.org/fundamentals-of-algorithms/ 3/19/25, 2 58 PM
Page 7 of 12
:
Pattern Searching Guide
Practice Problems on Pattern
Searching
https://www.geeksforgeeks.org/fundamentals-of-algorithms/ 3/19/25, 2 58 PM
Page 8 of 12
:
Randomized algorithms are algorithms
that use randomness to solve
problems. They make use of random
input to achieve their goals, often
leading to simpler and more efficient
solutions. These algorithms may not
product same result but are
particularly useful in situations when
a probabilistic approach is acceptable.
Related Articles:
Similar Reads
https://www.geeksforgeeks.org/fundamentals-of-algorithms/ 3/19/25, 2 58 PM
Page 9 of 12
:
Data Structures Tutorial
https://www.geeksforgeeks.org/fundamentals-of-algorithms/ 3/19/25, 2 58 PM
Page 10 of 12
:
Hashing in Data Structure
Hashing is a technique used in data structures that
efficiently stores and retrieves data in a way that
allows for quick access. Hashing involves mapping
data3tomin read
a specific index in a hash table (an array of
items) using a hash function. It enables fast
retrieval of information based on its key. The
Advertise with us
https://www.geeksforgeeks.org/fundamentals-of-algorithms/ 3/19/25, 2 58 PM
Page 11 of 12
:
Computer DevOps System Inteview School GeeksforGeeks
Science Git Design Preparation Subjects Videos
Operating Linux High Level Competitive Mathematics DSA
Systems AWS Design Programming Physics Python
Computer Docker Low Level Top DS or Chemistry Java
Network Kubernetes Design Algo for CP Biology C++
Database Azure UML Company- Social Web
Management GCP Diagrams Wise Science Development
System DevOps Interview Recruitment English Data Science
So!ware Roadmap Guide Process Grammar CS Subjects
Engineering Design Company- Commerce
Digital Logic Patterns Wise World GK
Design OOAD Preparation
Engineering System Aptitude
Maths Design Preparation
So!ware Bootcamp Puzzles
Development Interview
So!ware Questions
Testing
https://www.geeksforgeeks.org/fundamentals-of-algorithms/ 3/19/25, 2 58 PM
Page 12 of 12
: