Skip to content
bradendubois edited this page Nov 24, 2021 · 3 revisions

SMIL

ID: smil

Difficulty: 1.3 - 1.4

CPU Time: 1 second

Memory: 1024 MB

Solution

Faces can be identified here in one pass through representing the 'state' of what has been seen so far. Any ':' or ';' would represent the start of a face. Encountering a '-' while in this first state moves to the next state, and encountering a ')' in either of these states represents the conclusion of a face. Update the 'start index' any time one is moved into the 'start' state.

Clone this wiki locally