recursion subsequences
This is a(n):
- [ ] New algorithm
- [ ] Update to an existing algorithm
- [ ] Error
- [ ] Proposal to the Repository
Details:
Take as input str, a string. We are concerned with all the possible subsequences of str. E.g. “abcd” has following subsequences “”, “d”, “c”, “cd”, “b”, “bd”, “bc”, “bcd”, “a”, “ad”, “ac”, “acd”, “ab”, “abd”, “abc”, “abcd”.
a. Write a recursive function which returns the count of subsequences for a given string. Print the value returned.
b. Write a recursive function which returns an ArrayList of subsequences for a given string. Print the value returned.
c. Write a recursive function which prints all possible subsequences for a given string (void is the return type for function).
Example(To be used only for expected output): Input: abc output 8 [, a, b, ab, c, ac, bc, abc]
c b bc a ac ab abc
Please assign me this issue . I want to implement it in C++ and Java
Please assign me this issue . I can implement it in Java
please assign this issue to me I can do it in java.