Link: https://leetcode.com/problems/path-crossing/
Solution:
Intuition
Very simple graph problem. The idea is to traverse the coordinates and keep them in a set. If a new coordinate is in the set, return True.
Implementation
Visual
Link: https://leetcode.com/problems/path-crossing/
Intuition
Very simple graph problem. The idea is to traverse the coordinates and keep them in a set. If a new coordinate is in the set, return True.
Implementation
Visual