what is main logic behind turning a register into byte count other than multiplying by 2View more random threads:
- excuteing the progreme and how does can i best my programe...
- What is the syntax of copy constructor in c 2011
- Bitwise Operators ( &, |, ^, ~, <<, >> ) May...
- what is the purpose is isopen() in main menu,difining...
- oop an procedral programming 2011
- why we use pointers or reference except using real name of...
- Write a calculator program using a do-while loop in c++ 2011
- Programme Not Run in C++ giving erros 2011
- protected inheritance and abstract classes in C++ 2012
- how the information hidden within an object can be assessed...
Answer :
In Bubble sort, we comparing each pair of adjacent items and swapping them if they are in the wrong order. The pass through the list is repeated until no swaps are needed, which indicates that the list is sorted.
Sponsored Links
So basically we are using 2 counters, in complete sorting algorithm, One through which we are checking that whether are ended with list or not, Second through which we are checking either the specific item in list is sorted with respect to its neighbor or not. In our code, we use CX as a byte count in order to check that the algorithm is going through the complete list or not and SI for internal counting whether the specific item is compared/swapped with the remaining list or not.
There are currently 1 users browsing this thread. (0 members and 1 guests)