Check if two-group seating is possible | TikTok Interview Question