Skip to content

Commit f06747b

Browse files
committed
[level 2] Title: 구명보트, Time: 7.49 ms, Memory: 11.6 MB -BaekjoonHub
1 parent 4971e31 commit f06747b

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

프로그래머스/2/42885. 구명보트/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
### 성능 요약
66

7-
메모리: 9.62 MB, 시간: 8.73 ms
7+
메모리: 11.6 MB, 시간: 7.49 ms
88

99
### 구분
1010

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

1717
### 제출 일자
1818

19-
2025년 04월 25일 11:41:06
19+
2026년 07월 01일 22:49:59
2020

2121
### 문제 설명
2222

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
def solution(people, limit):
22
people.sort()
3-
cnt, left, right = 0, 0, len(people)-1
3+
left, right, cnt = 0, len(people) - 1, 0
44

55
while left <= right:
66
if people[left] + people[right] <= limit:
77
left += 1
88
right -= 1
99
cnt += 1
10-
return cnt
11-
12-
10+
return cnt

0 commit comments

Comments
 (0)