Tutorials
Courses
Go Premium
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
32.1K+ articles
Misc
7.8K+ 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
909+ articles
DSA
20.2K+ posts
Recent Articles
Popular Articles
Minimum Window Subsequence
Last Updated: 14 August 2025
Given two strings s1 and s2, find the smallest contiguous substring of s1 in which s2 appears as a subsequence.The characters of s2 must appear in the same order within th...
read more
DSA
Mode in Every k-Sized Window
Last Updated: 08 August 2025
Given an array arr[] of positive integers and an integer k. Find the sum of the modes of all subarrays of size k.Note: The mode of a subarray is the element that occurs wi...
read more
DSA
Maximum Sum Subarray 2
Last Updated: 14 August 2025
Given an integer array arr[] of size n, along with two integers a and b, determine the maximum possible sum of a contiguous subarray whose length is at least a and at most...
read more
DSA
Search in fully rotated sorted 2D matrix
Last Updated: 12 August 2025
Given a sorted 2D matrixmat[][]of size n x m that was initially filled such that:The elements increase left to right across rows.The first element of each row is greater t...
read more
DSA
Understanding Prefix Sums
Last Updated: 28 July 2025
In programming, prefix sum arrays are a simple and powerful technique. They make it easier to solve problems that involve finding the sum of numbers between two points in ...
read more
DSA
Count Target in Sorted Matrix
Last Updated: 06 August 2025
Given a 2D matrix mat[][] and an integer x, count the number of times x appears in the matrix.The matrix follows these sorting rules:Each row is sorted in increasing order...
read more
DSA
Row with Max 1s in Binary Matrix
Last Updated: 08 August 2025
Given a 2D binary matrix mat[][], where each row contains only 0s and 1s, and each row is sorted in non-decreasing order (all the 0s come before any 1s). Find the index of...
read more
DSA
Range-Based Count of X in Sorted Array
Last Updated: 01 August 2025
Given a sorted array arr[] and a list of queries represented as a 2D array queries[][]. Each query is a triplet of the form [l, r, x], where l and r are indices in the arr...
read more
DSA
Count Elements in Range Queries
Last Updated: 07 August 2025
Given an unsorted array arr[] and a 2D array of queries[][], where each query is in the form of [a, b]. For each query, count how many elements in arr[] lie within the ran...
read more
DSA
Count Frequency of an Element in a Given Range
Last Updated: 16 July 2025
Given an array arr[] of integers and a 2D array queries[][], where each queries[i] contains three integers: l, r, and x. For each query, determine how many times the eleme...
read more
DSA
Binary Search
Maximum Non-Overlapping Odd Palindrome Sum
Last Updated: 31 July 2025
Given a string s consisting of lowercase English letters, find the maximum possible sum of the lengths of any two non-empty and non-overlapping palindromic substrings of o...
read more
DSA
strings
Tywin's War Strategy
Last Updated: 18 July 2025
Given an array arr[] of length n, where arr[i] is the number of soldiers in the i-th troop, and an integer k. A troop is called lucky if its soldier count is a multiple of...
read more
DSA
Minimize Difference
Last Updated: 24 July 2025
Given an array arr[] of strings, where each string represents a time in 24-hour format ("HH:MM:SS"), find the minimum absolute difference in seconds between any two time v...
read more
DSA
strings
Longest Periodic Proper Prefix
Last Updated: 04 August 2025
Given a string s, find the length of the longest proper prefix such that repeating this prefix one or more times forms a string that contains s as a prefix. If no such pre...
read more
DSA
Balance Consonant and Vowels Ratio
Last Updated: 11 July 2025
You are given an array of strings arr[], where each string contains only lowercase English letters. Count the number of contiguous subarrays (i.e., one or more consecutive...
read more
DSA
DSA
1
2
3
4
...
1349
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 !