home *** CD-ROM | disk | FTP | other *** search
/ C by Discovery (4th Edition) / C_By_Discovery_4th_Edition.tar / C_By_Discovery_4th_Edition / CH_04 / 247.jpg < prev    next >
Joint Photographic Experts Group Image  |  2013-12-11  |  679KB  |  2550x3300
Labels: book | poster | reckoner
OCR: and Sorting Arrays 247 Searching The Given: an array n- with n cells ables, Set Loop whi index le index >0 between and index the Sel lect the largest value in the array the inclus Interchange .ve at index with the largest cifics the value iocati ion iffer val lue decr rement index Dy For example assurme that the array to be sorted is 15 through the first three iterations of the selection sort the with array and walk First Since is the there Iteration: at are index six Index elements in the array, the indices go from in this the between 0 to array array, We indices we will get The largest value in Interchanging with the last element 682519 he and Second the Iteration: at 1 Index The largest value in the element array at index between we indices get index Interchanging the with the nd 51 258 ...