JFrog interview question

Sort array - code question And my history