From d6d2fcac27a9c9e7d9808bdf6575240cbf6fdec9 Mon Sep 17 00:00:00 2001 From: isinsuarici Date: Wed, 8 Mar 2023 21:01:28 +0300 Subject: [PATCH] Q1779 added. --- ...dNearestPointThatHastheSameXorYCoordinate.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 E_1779_FindNearestPointThatHastheSameXorYCoordinate.java diff --git a/E_1779_FindNearestPointThatHastheSameXorYCoordinate.java b/E_1779_FindNearestPointThatHastheSameXorYCoordinate.java new file mode 100644 index 0000000..389dde1 --- /dev/null +++ b/E_1779_FindNearestPointThatHastheSameXorYCoordinate.java @@ -0,0 +1,15 @@ +class Solution { + public int nearestValidPoint(int x, int y, int[][] points) { + int min=10001; + int index=-1; + for(int i=0;i