This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Avantos Coding Challenge: computePolkadotScore | |
| // Formula: | |
| // score = polkadotsOutsideLips + (polkadotsInsideLips * pupilCharCount) | |
| function computePolkadotScore(asciiArt) { | |
| const lines = asciiArt.split('\n'); | |
| // Lips: second occurrence of 6+ tildes (the first ~~~~~~ is the forehead, the second is the mouth) | |
| const tildeRanges = []; | |
| for (const line of lines) { |