...

/

DIY: Longest Substring with At Most K Distinct Characters

DIY: Longest Substring with At Most K Distinct Characters

Problem statement

Given a string, find the length of the longest substring T that contains at most k distinct characters.

Input

The input will contain a string s and an integer ...

Access this course and 1200+ top-rated courses and projects.

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy