http://forum.lolcode.com/
/*** I HAS A QSORT! ***/
HOW DUZ I QSORT YR DATA AN YR BEGIN AN YR END
END PWNS BEGIN
O RLY?
YA RLY
GTFO
OIC
I HAS PIVOT AN LEFT AN RIGHT AN TEMP
PIVOT R NMBR BEGIN OF DATA
LEFT R SUM OF BEGIN AN 1
RIGHT R END
IM IN YR BIGLOOP
IM IN YR LEFTLOOP UPPIN YR LEFT TILL EITHER OF LEFT PWNS RIGHT AN NMBR LEFT OF DATA PWNS PIVOT
OUTTA YR LEFTLOOP
IM IN YR RIGHTLOOP NERFIN YR RIGHT TILL EITHER OF LEFT PWNS RIGHT AN NOT NMBR RIGHT OF DATA PWNS PIVOT
OUTTA YR RIGHTLOOP
LEFT PWNS RIGHT
O RLY?
YA RLY
GTFO BIGLOOP
OIC
TEMP R NMBR LEFT OF DATA
NMBR LEFT OF DATA R NMBR RIGHT OF DATA
NMBR RIGHT OF DATA R TEMP
UP LEFT
NERF RIGHT
OUTTA YR BIGLOOP
NMBR BEGIN OF DATA R NMBR RIGHT OF DATA
NMBR RIGHT OF DATA R PIVOT
QSORT DATA AN BEGIN AN DIFF OF RIGHT AN 1
QSORT DATA AN SUM OF RIGHT AN 1 MKAY AN END
IF U SAY SO