Tutorials
Courses
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
37.4K+ articles
DSA
21.3K+ articles
Misc
8.5K+ articles
Mathematical
7.6K+ articles
Arrays
6.1K+ articles
Competitive Programming
3.1K+ articles
Strings
3.0K+ articles
Searching
1.6K+ articles
subarray
658+ articles
subarray-sum
192+ articles
sliding-window
204+ posts
Recent Articles
Popular Articles
Find the Longest Substring Conversion
Last Updated: 17 December 2023
Given two strings source and target of equal length, and two positive integers, maxCost, and conversionCost, the task is to find the indices of the longest substring in so...
read more
Strings
Geeks Premier League
DSA
Binary Search
sliding-window
Geeks Premier League 2023
Sliding Window Problems | Identify, Solve and Interview Questions
Last Updated: 16 June 2024
When we are dealing with problems that require checking answers of some ranges in an array, the Sliding window algorithm can be a very powerful technique.What are Sliding ...
read more
DSA
Arrays
sliding-window
Interview-Questions
Interview Questions
Number of subarray's of K size with Even Bitwise-OR
Last Updated: 10 January 2024
You are given an array arr[] containing n integers and an integer k. Find the number of subarrays of arr with length k whose bitwise OR is even.Examples:Input: arr[] = {4,...
read more
Geeks Premier League
Sliding Window 23
DSA
sliding-window
Bitwise-OR
Maximum number that can be obtain by swapping adjacent digits of same parity
Last Updated: 20 March 2024
Given an integer N, the task is to find the maximum integer that can be obtained from the given integer such that the adjacent digits of the same parity can be swapped any...
read more
Geeks Premier League
Sliding Window 23
DSA
sliding-window
Arrays
Greedy Algorithms
Geeks Premier League 2023
Find longest substring of S1 that matches in S2 with a given cost
Last Updated: 10 March 2024
Given two strings S1 and S2 of length n. Additionally, two positive integers, target and C. The task is to determine the maximum length of a contiguous substring in S1 suc...
read more
Strings
Geeks Premier League
DSA
Binary Search
sliding-window
Geeks Premier League 2023
CSES Solutions - Maximum Subarray Sum II
Last Updated: 23 March 2024
Given an array arr[] of N integers, your task is to find the maximum sum of values in a contiguous subarray with length between A and B.Examples:Input: N = 8, A = 1, B = 2...
read more
Competitive Programming
Picked
DSA
sliding-window
deque
CSES Problems
CSES Solutions - Sliding Window Cost
Last Updated: 16 March 2024
You are given an array arr[] of N integers. Your task is to calculate for each window of K elements, from left to right, the minimum total cost of making all elements equa...
read more
Sorting
Competitive Programming
Picked
DSA
sliding-window
CSES Problems
Smallest subarray such that its bitwise OR is at least k
Last Updated: 12 May 2024
Given an array arr[] of non-negative integers and an integer k. The task is to find the smallest non-empty subarray of arr[] such that the bitwise OR of all of its element...
read more
DSA
Arrays
sliding-window
Bit Algorithms
Count Number of Substrings With Fixed Ratio
Last Updated: 06 June 2024
Given a binary string s and two coprime integers n1 and n2, the task is to find the number of non-empty substrings where the ratio of 0's to 1's is exactly n1 : n2.Example...
read more
Strings
Picked
DSA
Intuit
sliding-window
Check for Array Contains Duplicate III
Last Updated: 24 May 2024
Given an integer array arr[] and two integers indexDifference and valueDifference, find a pair of indices (i, j) such that:i != jabs(i - j) = indexDifferenceabs(arr[i] - a...
read more
Hash
Picked
DSA
Arrays
Adobe
sliding-window
Count K-Length Substrings With No Repeated Characters
Last Updated: 11 October 2024
Given a string S and an integer k, the task is to return the number of substrings in S of length k with no repeated characters.Example:Input: S = "geeksforgeeks", k = 5Out...
read more
Strings
Picked
DSA
Amazon
sliding-window
Divide an array into k subarrays with minimum cost II
Last Updated: 14 June 2024
Given an array of integers arr[] of length n and two positive integers kk and len. The cost of an array is the value of its first element. For example, the cost of [2,3,4]...
read more
Picked
DSA
Arrays
Microsoft
sliding-window
priority-queue
cpp-multiset
Find the Longest Turbulent Subarray
Last Updated: 07 June 2024
Given an integer array arr[] of size n. A subarray is turbulent if the comparison sign flips between each adjacent pair of elements in the subarray. The task is to find th...
read more
Picked
DSA
Arrays
sliding-window
Uber
Count Subarrays With At Most K Distinct Elements
Last Updated: 01 July 2025
Given an array arr[] of integers and a positive integer k, the goal is to count the total number of subarrays that contain at most k distinct (unique) elements.Examples:In...
read more
Sliding Window 23
DSA
sliding-window
Top Problems on Sliding Window Technique for Interviews
Last Updated: 16 May 2025
The Sliding Window Technique is a powerful algorithmic approach used to solve problems involving arrays or lists where a subarray or subsequence is required to be analyzed...
read more
DSA
sliding-window
1
2
3
4
...
14
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 !