Courses
Tutorials
Interview Prep
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
Similar Topics
Web Technologies
32.1K+ articles
Misc
7.7K+ articles
Mathematical
5.1K+ articles
Arrays
4.2K+ articles
Strings
2.1K+ articles
Greedy
1.4K+ articles
Sorting
1.1K+ articles
Dynamic Programming
1.1K+ articles
Searching
1.0K+ articles
Tree
911+ articles
DSA
/
Algorithms
Algorithms
9.1K+ posts
Recent Articles
Popular Articles
DP Problems Dimension Wise (1D, 2D and 3D)
Last Updated: 23 July 2025
When we solve a Dynamic Programming (DP) problem, we store solution in an array. The dimensions of the array are dependent on number of variables that change in recursive ...
read more
Dynamic Programming
DSA
DP Standard Problem Variations
Last Updated: 23 July 2025
When we solve Dynamic Programming problems, we try to find a pattern by matching pattern with a standard DP problem. This is generally recommended to solve new DP problems...
read more
Dynamic Programming
DSA
Fibonacci
LIS
LCS
catalan
binomial coefficient
Assign Maximum Cookies
Last Updated: 02 September 2025
Given two arrays, greed[] and cookie[] such that greed[i] denotes the minimum cookie size wanted by ith child and cookie[i] denotes the size of ith cookie, we have to find...
read more
Greedy
Sorting
DSA
Tips and Tricks to Find GCD
Last Updated: 14 October 2024
Let us first discuss the standard method to find GCD of two numbers a and b.Step 1: List all the divisors of the number ‘a’.Step 2: List all the divisors of the number ‘b’...
read more
Mathematical
School Learning
DSA
GCD-LCM
Prime Factorization Tips and Tricks
Last Updated: 23 July 2025
Let us first go through the standard Prime Factorization by the Division Method. Then we will be talking about tips and tricks to make it faster.Step 1: Divide the number ...
read more
Mathematical
School Learning
DSA
prime-factor
Interesting Facts about Prime Factorization
Last Updated: 23 July 2025
1. Every integer greater than 1 can be uniquely factored into prime numbers. This is known as the Fundamental Theorem of Arithmetic. For example, 60 can be written as 22×3...
read more
Mathematical
Mathematics
School Learning
Is 0 divisble by every Integer
Last Updated: 09 April 2025
Yes, 0 is considered to be divisible by every integer other than 0. Dividing by zero itself is undefined, so 0 is not divisible by 0.Why? Let a,b be integers. Then b is ...
read more
Mathematical
Mathematics
School Learning
Upper Bound
Last Updated: 05 August 2025
Given a sorted array arr[] and a number target, find the upper bound of the target in this given array. The upper bound of a number is defined as the smallest index in the...
read more
Searching
DSA
Arrays
Binary Search
Lower Bound
Last Updated: 05 August 2025
Given a sorted array arr[] and a number target, find the lower bound of the target in this given array. The lower bound of a number is defined as the smallest index in the...
read more
Searching
DSA
Arrays
Binary Search
Intersection of Two Sorted Arrays with Distinct Elements
Last Updated: 23 July 2025
Given two sorted arraysa[]andb[] with distinct elements of sizenandm respectively, the task is to find intersection (or common elements) of the two arrays. We need to retu...
read more
Searching
DSA
Arrays
union-intersection
4 Sum - Find any quadruplet having given sum
Last Updated: 03 February 2026
Given an array arr[] of integers and an integer target, the task is to find any quadruplet in arr[] such that it's sum is equal to the target. Note: If there are multiple...
read more
Searching
DSA
Arrays
two-pointer-algorithm
4 Sum - Quadruplet Sum Closest to Target
Last Updated: 23 January 2026
Given an array arr[] of n integers and an integer target, the task is to find a quadruplet in arr[] whose sum is closest to target.Note: There may be multiple quadruplets ...
read more
Searching
DSA
Arrays
two-pointer-algorithm
Union of Two Sorted Arrays with Distinct Elements
Last Updated: 23 July 2025
Given two sorted arrays a[] and b[] with distinct elements, the task is to returnunionof both the arrays in sorted order.Note:Union of two arrays is an array having alldis...
read more
Sorting
Hash
DSA
Arrays
union-intersection
2 Sum - Find a pair with given sum
Last Updated: 23 July 2025
Given an array of integers arr[] and an integer target, print a pair of two numbers such that they add up to target. You cannot use the same element twice.Examples:Input: ...
read more
Searching
Hash
DSA
Arrays
Union of Two Sorted Arrays
Last Updated: 23 July 2025
Given two sorted arrays a[] and b[], the task is to returnunionof both the arrays insorted order. Union of two arrays is an array having alldistinctelements that are prese...
read more
Searching
Hash
DSA
Arrays
union-intersection
1
2
3
4
...
608