Message on Whatsapp 8879355057 for DSA(OA + Interview) + Fullstack Dev Training + 1-1 Personalized Mentoring to get 10+LPA Job
1 like 0 dislike
in Tutorials-Roadmap by Expert (111,530 points)
retagged by | 11,051 views

1 Answer

0 like 0 dislike

Author of this sheet :

Complete DSA Roadmap :- 

Desi QnA Sliding-Window Sheet (Make sure to go through set A and set B to have a good preparation level for an interview)


For the best output , make sure that you are thorough with the concepts of Hashing and Two-Pointers and have done enough practice on the same. 

Hashing sheet :

Two-Pointer sheet :

Step - 0 : 

Watch this video to understand the concept of sliding window :

Nice write-up :

 Step - 1 : Solve problems from set-A.

Note : Many problems can have two solutions : 1)Hashing solution or 2)Two-Pointers/Sliding-Window-Based solution , make sure you know both the solutions , Hashing based solution will always used some memory as you will be using a map to store some values. When all integers in an array are positive , mostly Two-Pointers/Sliding Window Method is used , otherwise Hashing as it can handle the case of negative integers too :) 

Set - A : 

P1 :

(Very Important to clear up your fundamentals)

P2 : Find maximum sum subarray of size 'K'

P3 :

 Solution :

 P4 : Find minimum size subarray in an array of positive integers having sum K.. 

Solution video :

(Hashing solution with O(N) is also possible to this problem so know that too  especially in case negative integers are present.)

P5 :

Step - 2 : Read this and expand + broaden your knowledge  -

 Step - 3 : Solve problems from set-B . These problems will involve using a queue/de-queue data structure , so learn how to declare and use them and come back to solving this list..

Set - B : Make your mind flexible and mix up and find different solutions to the same problem using Hashing/Two-Pointers/Sliding-Window :) Most importantly , enjoy the process!!

P1 :

Solution : 



P2 :

(There are both Hashing and Sliding-Window + Priority-Queue solution)

P3 :

P4 :

P5 :

P6 :

P7 :

Step - 4 : If you are aiming for a really expert level , solve the set - C :) 

Set-C : Will come soon!


by Expert (111,530 points)
edited by