ICU Medical interview question

Triangle Coding, Reverse string, Output as expected