title: How to sort multi-dimensional array in C++?
body: <p>I have given an array 'stockPrices[][]' where stockPrices[i] = [day-i, price-i]. Now, I have to sort this array in order of their days.
  Like if
  stockPrices = [[3,4],[1,2],[7,8],[2,3]]
  Then I have to sort it to
  stockPrices = [[1, 2],[2, 3],[3, 4],[7, 8]]</p>
  <p>I know how to sort this using quick sort, merge sort. But is there any inbuilt function in C++ to sort the array as I need. I know for sorting one dimensional array we have sort(arr, arr+n), but what about multidimensional array?</p>