Question DSA-TP-0048
MediumWhich technique finds the longest substring with at most k distinct characters?
- A.
Binary search
- B.
A sliding window with a character-count map
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Two Pointers and Sliding Window question
Which technique finds the longest substring with at most k distinct characters?
Binary search
A sliding window with a character-count map
Sign up free to see the answer and a step-by-step explanation.
Sorting
Dynamic programming over all pairs