Commit c92b0d93 authored by RANJANA B KASANGERI's avatar RANJANA B KASANGERI

add basic implementation

parent 281da52c
#include "sorting.h"
vector<int> sort_custom(vector<int> a)
{
bool swapp = true;
while(swapp){
swapp = false;
for (size_t 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