Google Front-End Virtual Onsite

We agreed to meet at 10 am, but the person didn’t show up, so I waited awkwardly for an hour. I thought Google Meet was not working, so we rescheduled for the 17th at 11 am. We discussed topics like disagreements with the manager and what to do if someone in the team doesn’t want to go skiing for the team-building event.

Graph question: Please help me analyze how to solve it. If it meets all conditions, return True. Input: list of points
(1 N 2),
(2 N 3),
(3 N 1) # return False
This is just a simple example. There are a total of 8 directions: east, south, west, north, plus 4 corners. The interviewer said this is a common problem of detecting cycles in a graph, but I haven’t practiced this question before. Frustrating, seems like I still have a lot to learn.