Getting run error in distinct permutations

my code https://ide.codingblocks.com/s/33887
ques link https://hack.codingblocks.com/contests/c/523/401

Your array is of size 100 but the number of permutations of string of length k will be k!, so for strings with length > 4, you are getting runtime error

thanks it worked for me