Microsoft Interview Question

Similar to all possible combinations of a string