Longest Substring With K Unique Characters | Variable Size Sliding Window

Published: 20 December 2020
on channel: Aditya Verma
160,593
3.8k

Become a Competitive Programming Hero with this structured batch to help all levels of programmers sharpen their skills: http://unacademy.cc/AVBAT


[FREE] Beginners lessons in programming by Codechef: https://unacademy.com/a/beginner-spec...


Patreon Link:   / adityaverma  
Video Pdf Notes And Code:   / 45213007  

Playlist Link:    • Sliding Window Algorithm | Face to Fa...  


Problem Description: https://practice.geeksforgeeks.org/pr...

Given a string you need to print the size of the longest possible substring that has exactly k unique characters.


Example:
Input:
2
aabacbebebe
3
aaaa
1
Output:
7
4 .
------------------------------------------------------------------------------------------
Here are some of the gears that I use almost everyday:

🖊️ : My Pen (Used in videos too): https://amzn.to/38fKSM1
👨🏻‍💻 : My Apple Macbook pro: https://amzn.to/3w8iZh6
💻 : My gaming laptop: https://amzn.to/3yjcn23
📱 : My Ipad: https://amzn.to/39yEMGS
✏️ : My Apple Pencil: https://amzn.to/3kMnKYf
🎧 : My Headphones: https://amzn.to/3kMOzM7
💺 : My Chair: https://amzn.to/385weqR
🛋 : My Table: https://amzn.to/3kMohtd
⏰ : My Clock: https://amzn.to/3slFUV3
🙋🏻‍♀️ : My girlfriend: https://amzn.to/3M6zLDK ¯\_(ツ)_/¯

PS: While having good gears help you perform efficiently, don’t get under the impression that they will make you successful without any hard work.


Watch video Longest Substring With K Unique Characters | Variable Size Sliding Window online without registration, duration hours minute second in high quality. This video was added by user Aditya Verma 20 December 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 160,593 once and liked it 3.8 thousand people.