Hi I have a problem and I can not get the purpose of lines (14,15,16,17) of this site for Select algorithm please help me thanks
the site which I have this question from it : http://webcache.googleusercontent.com/search?q=cache:2PhiYQ1r76kJ:www.cse.yorku.ca/~andy/courses/3101/lecture-notes/LN4.ps+Linear+general+selection+algorithm+code&cd=3&hl=en&ct=clnk
EDITED: also is this correct to write these lines for the part"partition and recur by using the pivot"? {"m" is my pivot} and { i is the input of this algorithm}
arrOne<--{a of arr : a<m}
arrTwo<--{a of arr : a>m}
if (i < m ) then
return Select(arrOne,i)
else if (i > m) then
return Select(arrTwo,i-m)
else
return m