This is my first post in this LeetCode series, hope you enjoy it!
Solving algorithms can feel tough, but breaking them down step by step makes it fun.
Problem Statement#
You are given a 2D array points of size n x 2 representing integer coordinates of some points on a 2D plane, where points[i] = [xi, yi].
Count the number of pairs of points (A, B), where
A is on the upper left side of B, and there are no other points in the rectangle (or line) they make (including the border). Return the count.