Accenture Interview Question

In coding round I got questions on permutation problem and sub array