Top Problems on Sliding Window Technique for Interviews Last Updated : 16 May, 2025 Summarize Comments Improve Suggest changes Share Like Article Like Report 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. This technique allows you to reduce the time complexity of problems that would typically involve nested loops, by maintaining a "window" of elements and sliding it across the array. The window can either expand or shrink based on certain conditions, which helps in optimizing the solution.Easy ProblemsMaximum sum of a subarray of size kSmallest window containing 0, 1 and 2Check if Permutation of Pattern is SubstringCount Strictly Increasing Subarrays Remove Consecutive CharactersMaximum sum of subarray <= xMedium ProblemsLongest substring with distinct characters Substrings with K Distinct Maximum Fruits in Two BasketsSubstrings of length k with k-1 distinct elementsMinimum Removals for Target SumLongest Repeating Character ReplacementBinary subarray with sumSubarrays Product Less than KCount Occurrences of AnagramsLargest sum subarray of size at least kCount Distinct Elements In Every Window of Size K Subarray with given sum First negative integer in every window of size k Longest Subarray With Sum KSmallest window that contains all characters of string itself Smallest window in a String containing all characters of other String Equivalent Sub-Arrays Hard ProblemsMaximum of minimum for every window sizeLongest Substring with K UniquesMinimum Window Substring Largest sum subarray with at-least k numbers Comment More infoAdvertise with us Next Article Top Problems on Sliding Window Technique for Interviews U ujjwalroq0 Follow Improve Article Tags : DSA sliding-window Practice Tags : sliding-window Similar Reads VMWare Interview | Set 1 (MTS-2) VMWare interview for MTS-2 position. I Telephonic round 1. Given an array of strings. Find the maximum prefix among all the strings. Ans: First told about tries. Then went for trivial answer saying compare all the zeroth indices then first indices. 2. Similar to kadane's algorithm 3. I forgot this Q 3 min read GE digital Interview Experience | Set 6 First Round 110 students were selected, cutoff was 64.5 to give the first round. It was an online test having 5 sections. Platform was AMCAT. The sections included quant, logical reasoning, verbal reasoning, technical aptitude and Automata ( 2 coding questions in 45 minutes). Maintain good speed in 3 min read Flipkart Interview Experience | Set 21 I was interviewed at Flipkart. Following was my interview experience. Initially there was one telephonic screening round. then I was called at their bangalore office. Telephonic round: Given an unsorted array find an entry in array where arr[i]= i; modified it to if array is sorted. find median of a 2 min read Astrea IT Services Interview Experience | Set 1 (On Campus) Round 1 : In first round C language, C++, DBMS, Data-structure, input-output 40 questions in 30 minutes its little bit tough so be prepared for pointer input-output they select 14 out of 35 (these 35 shortlisted according to there marks BTech, 10th, and 12th basis I think above 75% or 80% I don't kn 4 min read Amazon Interview Experience | Set 359 (On-Campus) 20 MCQs mixed with simple Quants, logical, other Technical CS concepts (TOC, DS, DBMS, NETWORKS) 2 Programming questions (I solved both) Maximum Non-Adjacent Subsequence Use max (previous elementâs exclusive + arr[i]) idea. See Geeks For Geeks or Tushar Roy video if needed. Profit sort (Find no. of 5 min read Like