Subsequence of a String in(Java) Iterative method
Dec 21, 2020
Let say we have a String “abc” and we have to find all the subsequence of a string.
Input: abc
output:{a,b,ab,c,ac,bc,abc}
These all are the subsequence of our Input String .The basic approach to solve this problem by concat the current character to all the array elements.
this approach is iterative and very simple as well as easy to understand
output of this program is
This article is publish by Aditya Maurya