Frage im Vorstellungsgespräch bei Accenture

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