Skip to content

Commit e61de41

Browse files
committed
[level 2] Title: 최댓값과 최솟값, Time: 5.48 ms, Memory: 73.5 MB -BaekjoonHub
1 parent 0d60ea9 commit e61de41

2 files changed

Lines changed: 17 additions & 3 deletions

File tree

프로그래머스/2/12939. 최댓값과 최솟값/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# [level 2] 최댓값과 최솟값 - 12939
22

3-
[문제 링크](https://school.programmers.co.kr/learn/courses/30/lessons/12939)
3+
[문제 링크](https://school.programmers.co.kr/learn/courses/30/lessons/12939?language=java)
44

55
### 성능 요약
66

7-
메모리: 10.3 MB, 시간: 0.06 ms
7+
메모리: 73.5 MB, 시간: 5.48 ms
88

99
### 구분
1010

@@ -16,7 +16,7 @@
1616

1717
### 제출 일자
1818

19-
2024년 07월 21일 22:39:48
19+
2026년 06월 27일 16:06:33
2020

2121
### 문제 설명
2222

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import java.util.*;
2+
3+
class Solution {
4+
public String solution(String s) {
5+
StringBuilder sb = new StringBuilder();
6+
String[] temp = s.split(" ");
7+
int[] sort = new int[temp.length];
8+
for (int i = 0; i < temp.length; i++) {
9+
sort[i] = Integer.parseInt(temp[i]);
10+
}
11+
Arrays.sort(sort);
12+
return sort[0] + " " + sort[sort.length-1];
13+
}
14+
}

0 commit comments

Comments
 (0)