ByteDance Interview Question

OA1: Number of Good Arrays