Description: The ordered array of records R[1..N] is vertically arranged, each recording R as a bubble of weight R.key. According to the principle that the light bubbles can not be under the heavy bubbles, the array R is scanned from bottom to top: if the light bubbles are scanned to violate the principle, they float upward". So repeatedly, until finally, any two bubbles are on the light, the weight is down
To Search:
File list (Check if you may need any files):
1.txt