Assignment #5: More Recursion
Basic problem
A non-contiguous substring of String s is a sequence
of k >= 0 characters in s, in the order in which they occur
in s.
For instance, the following table shows ALL the
non-contiguous substrings of some String s.
String s All non-contiguous substrings of s
======== ==================================
"" ""
"a" "" "a"
"ab" "" "a" "b" "ab"
"abc" "" "a" "b" "ab" "c" "ac" "bc" "abc"
Write a routine generateAll that returns an
ArrayList containing
all the non-contiguous substrings of parameter s,
and test it.