File tree Expand file tree Collapse file tree 2 files changed +7
-11
lines changed
프로그래머스/1/42576. 완주하지 못한 선수 Expand file tree Collapse file tree 2 files changed +7
-11
lines changed Original file line number Diff line number Diff line change 44
55### 성능 요약
66
7- 메모리: 96.9 MB, 시간: 356.66 ms
7+ 메모리: 96.9 MB, 시간: 373.44 ms
88
99### 구분
1010
1616
1717### 제출 일자
1818
19- 2025년 01월 20일 17:06:17
19+ 2025년 09월 09일 22:48:22
2020
2121### 문제 설명
2222
Original file line number Diff line number Diff line change 1- import java .util .HashMap ;import java .util .Arrays ;
2-
3-
1+ import java .util .Arrays ;
42class Solution {
5- public String solution (String [] participant , String [] completion ) {
3+ public String solution (String [] participant , String [] completion ) {
64 Arrays .sort (participant );
75 Arrays .sort (completion );
8- int i ;
9- for (i =0 ;i <completion .length ;i ++){
10- if (!participant [i ].equals (completion [i ])){
6+ for (int i =0 ; i <completion .length ; i ++){
7+ if (!participant [i ].equals (completion [i ])) {
118 return participant [i ];
129 }
1310 }
14- return participant [i ];
15-
11+ return participant [participant .length -1 ];
1612 }
1713}
You can’t perform that action at this time.
0 commit comments