Getting SIGSEGV in CHEF AND LARGE PERMUTATION

I am getting SIGSEGV again and again in this problem.Is there something special that i need to take care of…