반응형
Notice
Recent Posts
Recent Comments
Link
목록codility (1)
It's easy, if you try
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/c4agsc/btq7EdLtqzh/8UK0rJaPojMP6ymcsqK2K0/img.png)
문제 Find the earliest time when a frog can jump to the other side of a river. FrogRiverOne coding task - Learn to Code - Codility Find the earliest time when a frog can jump to the other side of a river. app.codility.com 풀이 O(N^2)(A배열 하나를 확인할 때마다 모든 위치에 나뭇잎이 놓였는지 확인하는 방법)으로 풀면 성능 테스트에서 medium_range부터 Fail을 받기 때문에 O(N)으로 리팩토링했다. import java.util.*; class Solution { public int solution(int X, int[]..
알고리즘/자바(Java)
2021. 6. 18. 20:53