Company: Myntra_7may
Difficulty: medium
Emergency Code Configurations Problem Description Nadia was sprinting toward the server room to stop a critical outage. She glanced at a sticky note bearing the override code, but between the noise and the rush she couldn't be sure she had read every digit correctly. Call the number she thought she saw X. Nadia suspects some digits in the true code may occur more often than what she actually saw, or that she jumbled their order — but every digit she did see is guaranteed to be present somewhere in the real code. For example, if Nadia read the code 2042, then the digits 2, 0, and 4 are guaranteed to appear in the real code. The second '2' she read could either be genuine or a slip of memory. Valid possibilities for the real code therefore include: 2042 (exactly what she read), 2402 (same digits, different order), and 204 (only a single '2'). Invalid possibilities include: 22042 (an extra '2' that was never read), 4120 (an extra digit that was never read), and 0242 (a leading zero). Give