What is the use of creating a copy of the input in a recursive call? This is a code to generate all the substrings in of a given vector