Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit58282d8

Browse files
refactor 205
1 parent93f43d5 commit58282d8

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

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,11 @@
22

33
importjava.util.HashMap;
44
importjava.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
publicclass_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
publicstaticclassSolution1 {
2712
publicbooleanisIsomorphic(Strings,Stringt) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp