From 6082f49abec6df9b7031d437f3f7323fa2feed6a Mon Sep 17 00:00:00 2001 From: SinnoLn Date: Thu, 27 Aug 2026 22:38:02 +0900 Subject: [PATCH] 4024. Nearest Available Drone --- .../4024. Nearest Available Drone.java" | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 "leetcode3/\354\235\264\354\247\204\355\235\254/4024. Nearest Available Drone.java" 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