Capgemini Interview Question

Code for sorting strings without using inbuilt swift functions