I'm a bit stuck using quick sort algorithm on an integer array, while saving the original indexes of the elements as they're moved around during the sorting process. Using C#/Visual studio For example
ToSort Array {52,05,08,66,02,10} Indexes : 0 1 2 3 4 5
AfterSort Array {02,05,08,10,52,66} Indexes : 4 1 2 5 0 3
I need to save the indexes of the sorted values in another array. I feel like this is very complex as quick sorting is recursive and any help or pointers would be much appreciated! Thanks!