TikTok interview question

String partition based on max unique chars