Capgemini Interview Question

Code test for swap slice values