1779 Find Nearest Point That Has the Same X or Y Coordinate
You are given two integers, x and y, which represent your current location on a Cartesian grid: (x, y). You are also given an array points where each points[i] = [ai, bi] represents that a point exists at (ai, bi). A point is valid if it shares the same x-coordinate or the same y-coordinate as your location.
Return the index (0-indexed) of the valid point with the smallest Manhattan distance from your current location. If there are multiple, return the valid point with the smallest index. If there are no valid points, return -1.
The Manhattan distance between two points (x1, y1) and (x2, y2) is abs(x1 - x2) + abs(y1 - y2).
##############
My other Leetcode solving videos (easy)
https://www.youtube.com/playlist?list=PLg9w7tItBlZt4oUpNyWU_0rOItlScu1_d
Leetcode solving videos (Medium):
https://www.youtube.com/playlist?list=PLg9w7tItBlZvMGxy-y1eXURPD6Ao6kkzA
Leetcode solving videos (Hard):
https://www.youtube.com/playlist?list=PLg9w7tItBlZt4JQmlkGD3M5idZn14NyL6
############
-
8:59
MrPowers4Math
8 months agoDI Geometry - Section 3-5-Finding the distance between point and line
10 -
24:55
dragonhunt48
2 years agofinding my point on
19 -
2:42
Minute Math
1 year agoFind the Distance between AD using Geometry | Minute Math #geometry
11 -
15:23
The Pi Man
1 year agoHow to find the DISTANCE between TWO POINTS? - It's easy, just use this formula!
2 -
9:43
Leveling Up Math Skills with Basic | Caveman Chang
2 years agoPlotting and Identifying Points on a Coordinate Plan
14 -
4:46
IntoMath Grade 10 Lessons
3 years ago $0.01 earnedDistance between two points - Midpoint - Equation of circle - IntoMath
78 -
7:07
Unity Visual Scripting
3 years agoFind Nearest Game Object - Unity Visual Scripting / Bolt
9 -
7:06
Integral and multivariable calculus
3 years agoHow to find 3D position function given acceleration (worked example)
1 -
4:41
Professor Capko
1 year agoHow to Find the Midpoint of a Line
-
0:48
Math Shorts with Caveman Chang
3 months agoFinding the x and y value of the local minimum(s) of a function
2