answersLogoWhite

0

void bubblesort (int* array, int size) {

if (!array size<2) return;

int last_swap = size;

while (last_swap>0) {

int n=last_swap;

for (int i=1; i<last_swap; ++i) {

if (array[i]<array[i-1]) {

array[i]^=array[i-1]^=array[i]^=array[i-1];

n=i;

}

last_swap = n;

}

}

User Avatar

Wiki User

7y ago

What else can I help you with?

Related Questions

What does the term sorting refer to?

'Sorting' means separating things from each other.


The lyrics wearing your rolex what does the term 'bubble' mean please?

The term 'bubble' comes from Rhyming Slang. Bubble Bath = Laugh


What is the name of a bubble in science?

There really is no scientific word for a bubble. It could be called a globule which is a scientific term.


What term describes a bubble of fluid that appears when the skin is irritated?

Blister


Which term of these sets of numbers is not a subset of the real numbers?

That term, over there!


What term is a term with numbers not variables?

A constant term.


Which resource provides assistance in the development and implementation of a long-term monitoring plan and long-term recovery plans?

Radiological Assistance Program Team


What math term is a list of numbers in specific order?

They are a sequence of numbers and each sequence has a term number.


What is the term that describes the hiding of implementation details of objects from each other in a C plus plus class?

Encapsulation.


What is another term for binary numbers?

Base-2 Numbers.


What is the math term for a number a variable or a product of numbers and variables?

Term- a number, a variable, or a product of numbers and variables.


What are the after effects of sinkholes?

Sinkholes can cause damage to buildings, roads, and infrastructure. They can also result in injuries or fatalities if they occur suddenly and unexpectedly. Sinkholes can create long-term issues with land stability and drainage in affected areas.