Jump to content

Sort three variables: Difference between revisions

m
used a true bullet in the task's preamble.
m (combined three bullet items into one text paragraph with the same color background.)
m (used a true bullet in the task's preamble.)
Line 40:
 
One algorithm could be:
Θ<big><big>&bull;</big></big> store the three variables &nbsp; '''x''', '''y''', and '''z'''
into an array (or a list) &nbsp; '''A'''
&nbsp;
Θ<big><big>&bull;</big></big> sort (the three elements of) the array &nbsp; '''A'''
&nbsp;
Θ<big><big>&bull;</big></big> extract the three elements from the array and place them in the
variables '''x''', '''y''', and '''z''' &nbsp; in order of extraction
 
Cookies help us deliver our services. By using our services, you agree to our use of cookies.