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.

@github-actions
Copy link

github-actions bot commented Dec 8, 2025

This pull request has been automatically closed because its workflows or checks failed and it has been inactive for more than 14 days. Please fix the workflows and reopen if you'd like to continue. Merging from main/master alone does not count as activity.

@github-actions github-actions bot closed this Dec 8, 2025
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