Workday interview question

Basic algorithm problems (1st repeated character)