Statement: Given a vector of ranges of the form [L,R] (L,R > 0). We have to print all unique integers that can be formed by concatenating integers taking one at a time from each of such ranges.
Constraints: Size of vector of ranges ~ 100
R - L <= 1000
Sample Example: Given vector: <[2,4], [3,5]>
This was one of the question that I was asked in an interview. I could only give a recursion based approach to this, where I checked for every integer in every range. Can someone help me with a more optimised approach for this