Untitled
unknown
plain_text
3 years ago
359 B
9
Indexable
void Psort(process PList[])
{
bool swapped=false;
int i = 0;
while (true)
{
swap=false;
for (int i = 0; i<n-1; i++)
{
if(PList[i].arv > PList[i+1].arv)
{
process temp = PList[i];
PList[i] = PList[i+1];
PList[i+1] = temp;
swapped = true;
}
}
if (swapp==false)
return;
}
}Editor is loading...