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

Appearance settings

Latest commit

 

History

History
History
19 lines (16 loc) · 530 Bytes

File metadata and controls

19 lines (16 loc) · 530 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package ch17;
import java.util.Arrays;
public class P68_1 {
public String sort(String s) {
// 문자열을 문자 배열로 변환
char[] chars = s.toCharArray();
// 문자 배열을 정렬
Arrays.sort(chars);
// 문자 배열을 문자열로 만들어 리턴
return new String(chars);
}
public boolean isAnagram(String s, String t) {
// s를 정렬한 결과와 t를 정렬한 결과가 일치하는지 비교
return sort(s).equals(sort(t));
}
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.