XYZ interview question

Question. They asked to write method signature which return sorted array and number of element in array.