Showing runtime error
@Jun18APP0112
hello Gurdeep,
a)your are getting runtime error because ur array size is small ( 30 ) and it is possible that total valid strings are more than 30 .
to rectify it either use vector or declare ur array with bigger size.
b) valid strings will be less than n! so dont calculate n! ,it will be logically wrong