From a7cd97d75e530ad36056c97516a0967b03c6194c Mon Sep 17 00:00:00 2001 From: Alex Klymenko Date: Sat, 24 Aug 2024 10:57:54 +0200 Subject: [PATCH] refactor: fix typo (#5372) --- .../others/{GuassLegendre.java => GaussLegendre.java} | 4 ++-- src/main/java/com/thealgorithms/strings/Isomorphic.java | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) rename src/main/java/com/thealgorithms/others/{GuassLegendre.java => GaussLegendre.java} (94%) diff --git a/src/main/java/com/thealgorithms/others/GuassLegendre.java b/src/main/java/com/thealgorithms/others/GaussLegendre.java similarity index 94% rename from src/main/java/com/thealgorithms/others/GuassLegendre.java rename to src/main/java/com/thealgorithms/others/GaussLegendre.java index 5ecfdf2b..b56b51f1 100644 --- a/src/main/java/com/thealgorithms/others/GuassLegendre.java +++ b/src/main/java/com/thealgorithms/others/GaussLegendre.java @@ -6,8 +6,8 @@ package com.thealgorithms.others; * * @author AKS1996 */ -public final class GuassLegendre { - private GuassLegendre() { +public final class GaussLegendre { + private GaussLegendre() { } public static void main(String[] args) { diff --git a/src/main/java/com/thealgorithms/strings/Isomorphic.java b/src/main/java/com/thealgorithms/strings/Isomorphic.java index 088addc6..ccd68617 100644 --- a/src/main/java/com/thealgorithms/strings/Isomorphic.java +++ b/src/main/java/com/thealgorithms/strings/Isomorphic.java @@ -17,8 +17,8 @@ public final class Isomorphic { // To mark the characters of string using MAP // character of first string as KEY and another as VALUE // now check occurence by keeping the track with SET data structure - Map characterMap = new HashMap(); - Set trackUinqueCharacter = new HashSet(); + Map characterMap = new HashMap<>(); + Set trackUniqueCharacter = new HashSet<>(); for (int i = 0; i < s.length(); i++) { if (characterMap.containsKey(s.charAt(i))) { @@ -26,13 +26,13 @@ public final class Isomorphic { return false; } } else { - if (trackUinqueCharacter.contains(t.charAt(i))) { + if (trackUniqueCharacter.contains(t.charAt(i))) { return false; } characterMap.put(s.charAt(i), t.charAt(i)); } - trackUinqueCharacter.add(t.charAt(i)); + trackUniqueCharacter.add(t.charAt(i)); } return true; }