Skip to content

Commit 58282d8

Browse files
refactor 205
1 parent 93f43d5 commit 58282d8

File tree

1 file changed

+3
-18
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+3
-18
lines changed

src/main/java/com/fishercoder/solutions/_205.java

+3-18
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,11 @@
22

33
import java.util.HashMap;
44
import java.util.Map;
5-
/**
6-
* 205. Isomorphic Strings
7-
*
8-
* Given two strings s and t, determine if they are isomorphic.
95

10-
Two strings are isomorphic if the characters in s can be replaced to get t.
11-
12-
All occurrences of a character must be replaced with another character while preserving the order of characters. No two characters may map to the same character but a character may map to itself.
13-
14-
For example,
15-
Given "egg", "add", return true.
16-
17-
Given "foo", "bar", return false.
18-
19-
Given "paper", "title", return true.
20-
21-
Note:
22-
You may assume both s and t have the same length.*/
236
public class _205 {
24-
/**space should be O(1) since it only has alphabetic letters which are capped at 52.*/
7+
/**
8+
* space should be O(1) since it only has alphabetic letters which are capped at 52.
9+
*/
2510

2611
public static class Solution1 {
2712
public boolean isIsomorphic(String s, String t) {

0 commit comments

Comments
 (0)