Subsequences recursion

how can i do this question using string class?
i dont know how to pass a string by reference

string is simillar to character array
as in character array it is pass by reference by default
similarly strings are also pass by reference by default

to solve subsequences using string you can see Reference Code
Reference Code

i hope this helps
if yes hit a like and don’t forgot to mark doubt as resolved
if you have more doubts regarding this feel free to ask