Just using simple recursion to sort the array
Although this will not pass all test cases but still this is the most fundamental way to sort the array using recursion\n\n    vector<int> insertAT(vector<int> 
Although this will not pass all test cases but still this is the most fundamental way to sort the array using recursion\n```\n    vector<int> insertAT(vector<int> &V, int val) {\n      int len = V.size(); \n      if((len == 0) || (V[len-1] <= val)) {\n        V.push_back(val); return V;\n      }\n\n      int last = V[len-1]; \n      V.pop_back(); \n      insertAT(V, val);\n      V.push_back(last);\n      return V;\n    }\n\n    vector<int> sortArray(vector<int> &V) {\n      if(V.size() == 1) return V;\n\n      int last = V[V.size() - 1];\n      V.pop_back();\n      vector<int> temp = sortArray(V);\n      vector<int> sorted = insertAT(temp, last);\n      return sorted;\n    }\n```
['Recursion', 'Sorting']