![CLRS:median and order statistics CLRS:median and order statistics](https://image.shishitao.com:8440/aHR0cHM6Ly9ia3FzaW1nLmlrYWZhbi5jb20vdXBsb2FkL2NoYXRncHQtcy5wbmc%2FIQ%3D%3D.png?!?w=700&webp=1)
//maximum and minimum 暴力遍历 O(n)
//i-th element dicide and conquer
random_selected_partition k(all the element samller than value[k] put left of value[k],all tht elenment larger than value[k] put right)
recurrence test
if(i=k)return value[k]
if(i<k)do left partion find i-th
else do right partion find i-k th