add basic implementation

parent 1f3aa71c
#include "sorting.h"
using namespace std ;
vector<int> sort_custom(vector<int> data)
{
vector<int> arr(data.begin(), data.end()) ;
for(int i = 0; i < data.size(); i++)
{
for(int j = 0; j < data.size()-i-1; j++)
{
if (arr[j] > arr[j+1]) swap(arr[j],arr[j+1]) ;
}
}
return arr ;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment