/Longer-Side

find longer side of the chain

Primary LanguagePython

Longer-Side

find longer side of the chain

You are holding one link of a chain in your hand. Implement a function that is called as longer_side in order to find which side of the chain, relative to the link you are golding, has more links.

If the left side has more links than return Side.left, if the right side has more links return Side.right, and if both sides have an equal number of links or if the chain is a closed loop, return Side.none.