How to store the subsequences in a 2d array?
Don't want to print the subsequence
how? I am not getting the approach.
@raj.verma5454 please look at this code which generates all the sub sequences and inserts them into a vector
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.
What is wrong in this code?? Why it is not giving any output?
@raj.verma5454
hello Raj,
out[i] will give u empty string and on empty string string u can not use indexing to add character at some position.
a)so either use + operator i,e out[ss+i]+=out[i][j]
b) or first declare string of required size assign it to out[ss+i] and then use indexing
ohh thank you so much. I got my mistake.