私は宿題をしています。クイックソートを使用して文字列配列を並べ替える必要があり、配列内の要素は数値と文字列を組み合わせています。例えば
String s[];
s[0]="172,19,Nina";
s[1]="178,18,Apple";
s[2]="178,18,Alex";
したがって、並べ替えた後は、
s[0]=172,19,Nina
s[1]=178,18,Alex
s[2]=178,18,Apple
最初にすべての文字列を数値と文字列に分割し、次に172,178,178を並べ替え、次に19 18 18を並べ替え、最後にNina Apple Alexを並べ替える必要があると考えていますか?
これを行うための最良の方法は何ですか?