Decode an encoded string | Instacart Coding Question