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
912+ articles
DSA
20.5K+ posts
Recent Articles
Count Successful Binary Searches Irrespective of Pivot Selection
Last Updated: 09 September 2026
Given an array arr[] of n distinct integers (not necessarily sorted), consider the following search for a target:Maintain a range [lo, hi], initially [0, n-1].At each step...
read more
DSA
Delete Nodes Greater than K
Last Updated: 08 September 2026
Given the root of a Binary Search Tree (BST) and an integer k, delete all nodes whose values are greater than or equal to k and return the root of the modified BST.Example...
read more
DSA
RegEx Matching
Last Updated: 08 September 2026
Given a pattern string pat and a text string txt, check if pattern matches according to the following rules:If pat is preceded by a ^, the pattern is matched against the s...
read more
DSA
Last index of One
Last Updated: 08 September 2026
Given a string s consisting only of '0' and '1', find the last index at which '1' occurs. If '1' is not present in the string, return -1.Examples:Input: s = "01001"Output:...
read more
DSA
strings
Linear Search
House Robber
Last Updated: 07 September 2026
Given two integers n and k, where there are n houses arranged in a row and each house contains k amount of money, find the maximum amount of money a thief can rob without ...
read more
DSA
Split Array Elements into Bounded Parts
Last Updated: 08 September 2026
Given an array arr[] of positive integers and an integer k, split each element into the minimum number of parts such that every part is less than or equal to k, and find t...
read more
DSA
Multiply Left and Right Array Sums
Last Updated: 08 September 2026
Given an array of integers arr[], divide it into two subarrays left and right such that left contains the first half of the elements and right contains the remaining eleme...
read more
DSA
Arrays
Summed Matrix
Last Updated: 06 September 2026
Given two integers n and q, consider a n * n matrix where the value of each cell (i, j) is i + j, with both row and column indices starting from 1. Return the number of ce...
read more
DSA
Evaluate Formulae
Last Updated: 07 September 2026
Given four integer variables a, b, c, and d, write a single expression to evaluate the following formula:\frac{a + b}{c} + dUse integer division while evaluating the expre...
read more
DSA
Minimum Squares with Full Cuts
Last Updated: 06 September 2026
Given a rectangular paper with dimensions n × m, find the minimum number of squares that can be formed by cutting the paper. Each cut must be made completely across the r...
read more
DSA
Occurrences of Consecutive 3 Numbers
Last Updated: 06 September 2026
Given an integer array arr[], count the number of distinct special integers. An integer x is called a special integer if x - 1, x, and x + 1 are all present in the array. ...
read more
DSA
Number of Matches
Last Updated: 06 September 2026
There are n players participating in a knockout tournament. The rating of the i-th player is given by arr[i], where all ratings are distinct.The tournament is conducted in...
read more
DSA
Arrays
Longest Colored Path
Last Updated: 05 September 2026
Given an undirected acyclic graph (tree) with n nodes numbered from 1 to n. Each node is colored either Red (R) or Blue (B).The colors of the nodes are given by a string s...
read more
DSA
Trees
DFS
graph-cycle
Minimum Colors Required in Special DAG
Last Updated: 06 September 2026
Given a Directed Acyclic Graph (DAG) with V vertices and E edges represented by a 2D array edges[][], where edges[i] = {u, v} represents a directed edge from vertex u to v...
read more
DSA
Students with Max Average
Last Updated: 03 September 2026
Given a string array names[] containing the names of n students and a 2D integer array marks[][], where marks[i] contains the marks of the i-th student in three subjects, ...
read more
DSA
1
2
3
4
...
1365
✕