diff --git "a/leetcode3/\354\235\264\354\247\204\355\235\254/4024. Nearest Available Drone.java" "b/leetcode3/\354\235\264\354\247\204\355\235\254/4024. Nearest Available Drone.java" new file mode 100644 index 00000000..9150bb14 --- /dev/null +++ "b/leetcode3/\354\235\264\354\247\204\355\235\254/4024. Nearest Available Drone.java" @@ -0,0 +1,28 @@ +/* + +1. 아이디어 : 가장 가까운 범위를 만족하는 드론 찾기 + +2. 시간복잡도 : O(100) + +3. 자료구조/알고리즘 : 계산 + + */ + +class Solution { + public int nearestDrone(int[][] drones, int[] target) { + // 더 가까운 드론 찾기 + + int idx = -1; + int minDis = 10000000; + + for(int i=0; i