Problem Solving
[프로그래머스] Lv2 - 야간 전술보행
https://school.programmers.co.kr/learn/courses/30/lessons/133501?language=java 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 나의 별로인 코드와 다른사람의 코드를 비교해 보았다. 우선 나의 코드 import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; class Solution { public int solution(int distance, int[][] scope, int[][] times) { int..
배열의 값 순서 뒤집기
처음 배열의 값을 뒤집는 알고리즘을 생각했을 때 다음과 같은 알고리즘을 생각하기 쉽다. public class ReverseArrayTest { public static void main(String[] args) { int[] input = {5,10,73,2,-5,42}; int[] reversedInput = new int[input.length]; for (int i = 0; i