When I do practice interviews for Code2040, I use this simple string translation challenge a lot. Here's the solution.
Can you transform the names in this block so that the left side of the arrow matches the right side?
mr jim jones -> Mr. Jim Jones
James smith -> James Smith
Ms Sally Smith -> Ms. Sally Smith
MRS. KRISTIN BROWN -> Ms. Kristin Brown
Mister Tom Jones -> Mr. Tom Jones