AppDirect Interview Question

sorting array question