Senwell Solutions interview question

Sort the array without using array methods