Skip to content

Conversation

@Subhamstar
Copy link

Summary

Added a hard sliding window algorithm: Longest Substring with K Distinct Characters.

Details

  • Implemented sliding window + hashmap solution (O(n) time).
  • Added JavaDoc and clean code following project guidelines.
  • Added comprehensive JUnit tests to verify correctness and edge cases.
  • Placed files in correct directory: com/thealgorithms/strings/

Why this is useful?

This is a commonly asked interview problem (Amazon, Google, Meta) and is not present in the repository.
It demonstrates advanced sliding window patterns and educates beginners.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant