Expedia (IT) interview question

Print all subsequences in a string