Array base to pointer base

Can someone please help me out with converting the function from an array-based on to pointer-based it is for the selection sort algorithm. Thanks

1
2
3
4
5
6
7
8
9
10
void selectionSort(int items[], int start, int stop) {
       for (int i = start; i < stop - 1; ++i) {
             int min = i;
             for (int j = i + 1; j < stop; ++j) {
                 if (items[j] < items[min])
                     min = j;
           }
           swap(items[i], items[min]);
      }
}


Would it start of like this?

1
2
3
void selectionSort(int* start, int* stop){
//Actual part that I'm not too sure what goes here
}
Last edited on
Topic archived. No new replies allowed.