mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-08 02:04:31 +08:00
refactor: fix typo in class name LongestNonRepetitiveSubstring
(#5359)
This commit is contained in:
@ -1,16 +1,17 @@
|
||||
package com.thealgorithms.strings;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
final class LongestNonRepeativeSubstring {
|
||||
private LongestNonRepeativeSubstring() {
|
||||
final class LongestNonRepetitiveSubstring {
|
||||
private LongestNonRepetitiveSubstring() {
|
||||
}
|
||||
|
||||
public static int lengthOfLongestSubstring(String s) {
|
||||
int max = 0;
|
||||
int start = 0;
|
||||
int i = 0;
|
||||
HashMap<Character, Integer> map = new HashMap<>();
|
||||
Map<Character, Integer> map = new HashMap<>();
|
||||
|
||||
while (i < s.length()) {
|
||||
char temp = s.charAt(i);
|
Reference in New Issue
Block a user