Getting WA for using ArrayList and AC for using array (CHEFPSA)

can anybody help me with the qsn

i used ArrayList got WA:
used array got AC:
took me a lot of time to figure why I’m getting WA…

@revanthreddy85 can you please tell what was the mistake. Actually I am also facing same issue in other question.

@pankajpoply45 i got WA coz i used Arraylist ,used array got AC still dont know why…