i dont know why my code showing wrong ans ?
please tell me why my solution is wrong ??
problem ->
Given a string, count the number of distinct subsequences of it ( including empty subsequence ). For the uninformed, A subsequence of a string is a new string which is formed from the original string by deleting some of the characters without disturbing the relative positions of the remaining characters. For example, “AGH” is a subsequence of “ABCDEFGH” while “AHG” is not.
Input Format
First line of input contains an integer ‘t’ denoting number of test cases. Each of next t lines contains a string s.
Constraints
1<=t<=100 1<=length of s<=100000 s will contain upper letters only.
Output Format
For each test case print ans%1000000007 where ans is the number of distinct subsequences.
Sample Input
2
AAA
ABCDEFG
Sample Output
4
128