Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ private LongestNonRepetitiveSubstring() {
/**
* Finds the length of the longest substring without repeating characters.
*
* Uses the sliding window technique with a HashMap to track
* the last seen index of each character.
*
* Time Complexity: O(n), where n is the length of the input string.
* Space Complexity: O(min(n, m)), where m is the size of the character set.
*
* @param s the input string
* @return the length of the longest non-repetitive substring
*/
Expand Down
Loading