Optum interview question

String related coding question followed by some general dsa and oops concepts