Sir what is wrong in my approach , since we want the length of string to be 10 , so first case when all are a so only 1 way , another case when all are b's so again 1 way ,Now for the remaining cases
1. 8 a's and 1 bb , no of way =10C8
2.6 a's and 2 bb ,no of ways =10C6
3. 4 a's and 3 bb , no of ways =10C4
4. 2 a's and 4 bb ,no of ways =10C2
Now summing these all I am getting the answer as 512 , what is wrong in this logic ?