Skip to content

apaxiaaans

bradendubois edited this page Nov 24, 2021 · 7 revisions

Apaxiaaaaaaaaaaaans!

ID: apaxiaaans

Difficulty: 1.3

CPU Time: 1 second

Memory: 1024 MB

Solution

For this one, one can simply iterate through the string given and it, character-by-character, if the character is valid. To determine if it is valid, one can simply compare the character to the previous character, and if they are different, it can be output. To save time on lookups, a variable can be used to store the value of the last-output character, and it can be updated when the current character is different.

Clone this wiki locally