OK let's talk about the flaw in this program.

Question : 
Compare if two arrays have the same content (not in the same order)

So, It hasn't clearly specified anything yes nothing atall.

1.It doesn't specify whether array size is variant. 
2.It neither specify if the array is allowed to have duplicate entities.

So if you consider those factors this program fails miserably.

e.g {2,2,2} and {1,2,3,4,5,6}  and of course this shows the **Arrays have same content**