[Java] Leetcode 340. Longest Substring with At Most K Distinct Characters [Sliding Windows #4]

Опубликовано: 13 Май 2026
на канале: Eric Programming
6,843
90

In this video, I'm going to show you how to solve Leetcode 340. Longest Substring with At Most K Distinct Characters which is related to Sliding Window.

In fact, I also have a whole section of solving leetcode questions and categorize them: https://www.youtube.com/c/EricProgram...
━━━━━━━━━━━━━━━━━━━━━━━━━━
🔗 RESOURCES & LINKS

💬 Free Community & Support
Join our Discord:   / discord  

📅 Work With Me
New Projects - Free Strategy Call: https://calendar.app.google/sB9KrJP6e...
Technical Consultation (Paid 1:1): https://calendar.app.google/BU9D589X3...

🤝 Let's Connect
LinkedIn:   / ericwtech  
━━━━━━━━━━━━━━━━━━━━━━━━━━
Here’s a quick rundown of what you’re about to learn:

Course Contents
(0:00​​) Question
(1:30) Solution Explain
(4:23​​) Code

In the end, you’ll have a really good understanding on how to solve Leetcode 340. Longest Substring with At Most K Distinct Characters and questions that are similar to Sliding Window.

Now, if you want to get good at Sliding Window, please checkout my Sliding Window playlist.
   • Leetcode: Sliding Windows  

💻 Code: https://github.com/Eric-programming/C...