CodeArray interview question

Sort array without using in build function