Search⌘ K
AI Features

Self Crossing

Self Crossing follows an array of move lengths north, west, south, and east in rotation; return true if the path intersects any part of itself, including a prior point.

Statement

You are given an array of integers, distance, where each element represents the length of a move you will make on an X-Y plane. You start at ...