Commit e5467bff authored by Neeraj Kerkar's avatar Neeraj Kerkar

add basic implementation

parent 03d6ed95
#include<vector>
using namespace std;
vector<int> sort_custom(vector<int> a)
{
bool swapp = true;
while(swapp)
{
swapp = false;
for (int i = 0; i < a.size()-1; i++)
{
if (a[i]>a[i+1] )
{
a[i] += a[i+1];
a[i+1] = a[i] - a[i+1];
a[i] -=a[i+1];
swapp = true;
}
}
}
return a;
}
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