Suppose we have n set of numbers . we want to choose a number from each set that they were distinct . how we can do it efficiently ?
A -> 1 <= n <= 20 , 1 <= |s| <= 100 , 1 <= numbers <= 10^9 B -> 1 <= n <= 10^5 , 1 <= |s| <= 10^5 , 1 <= numbers <= 10^9 C -> In General ?
thanks in advance.