You are given a list of two-digit integers (each from 10 to 99, inclusive). You want to select as many numbers as possible in one selection such that:
d
(0–9) where
every selected number contains digit d in at least one position
(tens or ones).
For example, from [11, 21, 31, 41, 16, 17, 18, 34, 57], you can select 11, 21, 31, 41, 16, 17, 18 (7 numbers) because they all contain digit 1.
Return the maximum possible size of such a selection.
nums
of length
n
, where each
nums[i]
is a two-digit integer (
10
–
99
).