Hmm
Something tells me this will be very inefficient?Code:int* DPSort(int *Data) { int Table[100]; int SortedData[100]; unsigned int i = 0; for(; i < 100; i++) { Table[i] = i+1; } for(i = 0; i < 100; i++) { for(unsigned int j = 0; j < 100; j++) { if(Data[i] == Table[j]) { SortedData[j] = Data[i]; break; } } } return SortedData; }
Edit: Ready to flame the first one to comment my poor code!