Optum Interview Question

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