Skip to content
Courses
DSA to Development
Get IBM Certification
Newly Launched!
Master Django Framework
Become AWS Certified
For Working Professionals
Interview 101: DSA & System Design
Data Science Training Program
JAVA Backend Development (Live)
DevOps Engineering (LIVE)
Data Structures & Algorithms in Python
For Students
Placement Preparation Course
Data Science (Live)
Data Structure & Algorithm-Self Paced (C++/JAVA)
Master Competitive Programming (Live)
Full Stack Development with React & Node JS (Live)
Full Stack Development
Data Science Program
All Courses
Tutorials
Data Structures & Algorithms
ML & Data Science
Interview Corner
Programming Languages
Web Development
CS Subjects
DevOps And Linux
School Learning
Practice
Build your AI Agent
GfG 160
Problem of the Day
Practice Coding Problems
GfG SDE Sheet
Contests
Accenture Hackathon (Ending Soon!)
GfG Weekly [Rated Contest]
Job-A-Thon Hiring Challenge
All Contests and Events
DSA
Practice Problems
Python
C
C++
Java
Courses
Machine Learning
DevOps
Web Development
System Design
Aptitude
Projects
Sign In
▲
Similar Topics
DSA
22.3k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
Strings
3.2k+ articles
C++ Programs
2.5k+ articles
Competitive Programming
2.3k+ articles
Greedy
2k+ articles
Searching
1.7k+ articles
Dynamic Programming
1.5k+ articles
Data Structures
1.1k+ articles
DSA
>
Algorithms
Algorithms
14.6k+ posts
Popular Articles
Recent Articles
Dynamic Programming or DP
Last Updated: 18 March 2025
Dynamic Programming is an algorithmic technique with the following properties.It is mainly an optimization over plain recursion. Wherever we
...read more
Algorithms
Dynamic Programming
DSA
Searching Algorithms
Last Updated: 13 April 2025
Searching algorithms are essential tools in computer science used to locate specific items within a collection of data. In this tutorial, we
...read more
Searching
DSA
Difference between BFS and DFS
Last Updated: 18 October 2024
Breadth-First Search (BFS) and Depth-First Search (DFS) are two fundamental algorithms used for traversing or searching graphs and trees. Th
...read more
Algorithms
BFS
DFS
Difference Between
DSA
Similar Topics
DSA
22.3k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
Strings
3.2k+ articles
C++ Programs
2.5k+ articles
Competitive Programming
2.3k+ articles
Greedy
2k+ articles
Searching
1.7k+ articles
Dynamic Programming
1.5k+ articles
Data Structures
1.1k+ articles
Linear Search Algorithm
Last Updated: 27 March 2025
Given an array, arr of n integers, and an integer element x, find whether element x is present in the array. Return the index of the first o
...read more
Arrays
Searching
school-programming
CBSE - Class 11
DSA
Time Complexities of all Sorting Algorithms
Last Updated: 19 March 2025
The efficiency of an algorithm depends on two parameters:Time ComplexityAuxiliary SpaceBoth are calculated as the function of input size(n).
...read more
Analysis of Algorithms
Sorting
DSA
Data Structures and Algorithms-QnA
Prim’s Algorithm for Minimum Spanning Tree (MST)
Last Updated: 26 February 2025
Prim’s algorithm is aGreedy algorithm like Kruskal's algorithm. This algorithm always starts with a single node and moves through several
...read more
Amazon
Minimum Spanning Tree
Samsung
Cisco
Graph
Greedy
Prim's Algorithm.MST
DSA
Huffman Coding | Greedy Algo-3
Last Updated: 22 April 2025
Huffman coding is a lossless data compression algorithm. The idea is to assign variable-length codes to input characters, lengths of the ass
...read more
Amazon
Huffman Coding
Morgan Stanley
Samsung
United Health Group
Greedy
Heap
encoding-decoding
priority-queue
DSA
Kruskal’s Minimum Spanning Tree (MST) Algorithm
Last Updated: 05 March 2025
A minimum spanning tree (MST) or minimum weight spanning tree for a weighted, connected, and undirected graph is a spanning tree (no cycles
...read more
Kruskal
Kruskal'sAlgorithm
Graph
Greedy
MST
DSA
Longest Common Subsequence (LCS)
Last Updated: 04 March 2025
Given two strings, s1 and s2, the task is to find the length of the Longest Common Subsequence. If there is nocommon subsequence, return0. A
...read more
Strings
Amazon
Hike
FactSet
Dynamic Programming
subsequence
LCS
strings
DSA
KMP Algorithm for Pattern Searching
Last Updated: 25 February 2025
Given two strings txt and pat, the task is to return all indices ofoccurrencesof pat within txt. Examples:Input: txt = "abcab", pat = "ab"O
...read more
Strings
Amazon
Oracle
Accolite
Payu
MAQ Software
MakeMyTrip
Pattern Searching
DSA
Nth Fibonacci Number
Last Updated: 15 April 2025
Given a positive integer n, the task is to find the nth Fibonacci number.The Fibonacci sequence is a sequence where the next term is the sum
...read more
Amazon
Snapdeal
MAQ Software
MakeMyTrip
Bloomberg
Dynamic Programming
Mathematical
Fibonacci
series
Modular Arithmetic
matrix-exponentiation
DSA
Maximum and minimum of an array using minimum number of comparisons
Last Updated: 14 September 2024
Given an array of size N. The task is to find the maximum and the minimum element of the array using the minimum number of comparisons.Examp
...read more
Arrays
Divide and Conquer
Searching
Arrays
Numbers
DSA
Rotate an Array by d - Counterclockwise or Left
Last Updated: 03 October 2024
Given an array of integers arr[] of size n, the task is to rotate the array elements to the left by d positions.Examples:Input:arr[] = {1, 2
...read more
Arrays
Amazon
MAQ Software
SAP Labs
MakeMyTrip
Greedy
rotation
Wipro
DSA
Permutations of given String
Last Updated: 10 April 2025
Given a string s, the task is to return all permutations of a given string in lexicographically sorted order.Note: A permutation is the rear
...read more
Strings
Amazon
Samsung
Walmart
Cisco
Citrix
Snapdeal
Accolite
MAQ Software
Greedy
Backtracking
Mathematical
Combinatorial
OYO
permutation
Recursion
Apple
strings
DSA
Two Sum - Pair with given Sum
Last Updated: 21 December 2024
Given an array arr[] of n integers and a target value, the task is to find whether there is a pair of elements in the array whose sum is equ
...read more
Arrays
Microsoft
Amazon
Morgan Stanley
Flipkart
Accolite
Zoho
Hike
SAP Labs
CarWale
FactSet
Infosys
Backtracking
Hash
Amazon-Question
CarWale-Question
ABCO
Recursion
Wipro
DSA
2Sum
First
1
2
3
4
5
6
7
8
>>
Last
First
1
2
3
4
5
6
>>
Last
First
1
2
3
4
>>
Last
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !