What wrong in my logic?

U cant generate all subsquences try to think mathematically because max size of the string can be 100000 and generating all subsequences is way too costly.