TikTok interview question

Medium algorithm or data structure coding problems