JAVA_LeetCode 2224_Minimum Number of Operations to Convert Time 풀이 class Solution { public int convertTime(String current, String correct) { // 절대값으로 차이를 체크한 뒤, 60, 15, 5, 1로 나눈 수를 순차적으로 찾아서 더해준다. int[] prev = Arrays.stream(current.split(":")).mapToInt(Integer::parseInt).toArray(); int[] next = Arrays.stream(correct.split(":")).mapToInt(Integer::parseInt).toArray(); int time1 = prev[0] * 60 + prev[1], time2 = next[0] * 60 + next[1]; int res = 0, temp = 0; int target = time2 - time1; if(target < ...
#
JAVA
#
JAVA_LeetCode2224
#
JAVA_LeetCode2224_MinimumNumberofOperationstoConvertTime
#
JAVA_MinimumNumberofOperationstoConvertTime
#
LeetCode2224_MinimumNumberofOperationstoConvertTime