/Users/andrea/_magisterarbeit/korpus/clean/testkorpus/32/file13.html NN ----------------------------------------- : Here RB is VBZ the DT code NN with IN out IN HTML NP formatting VVG . SENT Save VV it PP to TO a DT file NN . SENT SwapSortAlgorithm NP . SENT java NP 1 CD . SENT 0 CD 95 JJ 06 CD 26 CD Jason NP Harrison NP Copyright NP c SYM 1995 CD University NN of IN British NP Columbia NP Permission NN to TO use VV , , copy VV , , modify VV , , and CC distribute VV this DT software NN and CC its PP$ documentation NN for IN NON JJ COMMERCIAL JJ purposes NNS and CC without IN fee NN is VBZ hereby RB granted VVN provided VVN that IN this DT copyright NN notice NN appears VVZ in IN all DT copies NNS . SENT Please UH refer VV to TO the DT file NN copyright NN . SENT html NN for IN further JJR important JJ copyright NN and CC licensing NN information NN . SENT UBC NP MAKES VVZ NO DT REPRESENTATIONS NNS OR CC WARRANTIES NNS ABOUT IN THE DT SUITABILITY NN OF IN THE DT SOFTWARE NN , , EITHER CC EXPRESS JJ OR CC IMPLIED JJ , , INCLUDING VVG BUT CC NOT RB LIMITED JJ TO TO THE DT IMPLIED JJ WARRANTIES NNS OF IN MERCHANTABILITY NP , , FITNESS NN FOR IN A DT PARTICULAR JJ PURPOSE NN , , OR CC NON JJ INFRINGEMENT NN . SENT UBC NP SHALL MD NOT RB BE VB LIABLE JJ FOR IN ANY DT DAMAGES NNS SUFFERED VVN BY IN LICENSEE NN AS IN A DT RESULT NN OF IN USING VVG , , MODIFYING VVG OR CC DISTRIBUTING VVG THIS DT SOFTWARE NN OR CC ITS PP$ DERIVATIVES NNS . SENT A DT swap NN sort NN demonstration NN algorithm NN We PP know VVP how WRB the DT data NNS was VBD constructed VVN and CC can MD use VV this DT to TO our PP$ advantage NN . SENT THIS DT IS VBZ NOT RB A DT SORT NN . SENT DO VVP NOT RB USE VV THIS DT ROUTINE NN FOR IN REAL JJ APPLICATIONS NNS . SENT IT PP IS VBZ ONLY RB A DT DEMONSTRATION NN OF IN HOW WRB LONG JJ IT PP TAKES VVZ JAVA NP TO TO SWAP VV N NP ELEMENTS NNS . SENT EQUIVALENT JJ CODE NN . SENT for IN int NP i NP 0 CD . SENT i NP 0 CD . SENT a DT i NP int NP i NP f SYM . SENT Shuffle NN the DT array NN for IN int NP i NP a DT . SENT length NN . SENT i NP 0 CD . SENT int NP j NN int NP i NP Math NP . SENT random JJ . SENT int NP t NN a DT i NP . SENT a DT i NP a DT j NN . SENT a DT j NN t NN . SENT pause NN . SENT Now RB sort VV the DT array NN . SENT Each DT time NN through IN the DT loop NN we PP remove VV a DT value NN , , find VV it's NNS correct JJ position NN in IN the DT array NN , , and CC place VV it PP there RB . SENT The DT displaced VVN value NN becomes VVZ the DT next JJ value NN to TO place VV . SENT int NP T NN a DT 0 CD . SENT int NP S NP a DT 1 CD . SENT for IN int NP i NP 0 CD . SENT i NP Return NN to TO Sorting VVG Algorithms NNS Demo NP