ä µM€ SA(5000),ST(30,1)BµMNI = 5000:Š CHANGE DIM 500 AND THIS 500 IF ARRAY SORT LARGER»M€ X = 0 Š NI:(ÁM SA(X)=† (1000):Š STORES RANDOM NUMBERS FOR SORTING2ÒM€<ßM€1 "START TIME: ";ˆ FñM€ "QUICK SORT"PôM€1 "FINISH TIME: ";ˆ ZN€ X=NI-10 Š NIBdN €1 SA(X):Š PRINT LAST 10 ELEMENTS TO MAKE SURE SORT WORKEDnN€x,N€‚/N"QUICK SORT"BŒ/NŠ Improved Quicksort submitted by Johan Brouwer, Luxembourg.(–/NŠ Thanks for the submission, Johan /NSP = 0 : ST(0,0) = 0ªFNST(0,1) = NI´VN€30¾VN L = ST(SP,0) : R = ST(SP,1) : SP = SP - 1 È|N €3+Ò|N LI = L : RI = R : SA = SA((L+R)/2) Ü¡N €3æ¡N €8 SA(LI) < SAð¤N LI = LI + 1 ú¨N €9¸N €8 SA(RI) > SA»N RI = RI - 1 ¿N €9"ÏN € € LI <= RI,ÛN € SA(LI), SA(RI)&6ðN LI = LI + 1 : RI = RI - 1@øN € €JøN €4 LI > RI TO € € (R-LI) > (RI - L)^O € € L < RI7h$O SP = SP + 1 : ST(SP,0) = L : ST(SP,1) = RIrJO € €|JO L = LI †PO €SO € € LI < R7š_O SP = SP + 1 : ST(SP,0) = LI : ST(SP,1) = R¤…O € €®…O R = RI¸‹O € €Â‹O €4 R <= LÌ—O€4 SP = -1$Ö¢O€ : Š Quicksort finished hereà£O€ÿÿ