Goodnotes interview question

Random string generation easy level DSA problem.