# Execution time of function

At the algorithm SELECT, there is the following step:

If $i=k$, then return $x$. Otherwise, use SELECT recursively to find the $i$th
smallest element on the low side if $i<k$, or the $i-k$ th smallest element on
the high side if $i>k$.


How could we find the cost of this step?

• did you have a look at 'Analysis of Algorithms' on Coursera? – Alex Mar 6 '15 at 22:11
• No, I have the book Introduction to algorithms by Cormen.. @Alex – evinda Mar 6 '15 at 22:18
• In the Coursera courses (2 different actually) both algorithms are explained quite well – Alex Mar 6 '15 at 22:26
• @Alex Can I find these courses online? – evinda Mar 6 '15 at 22:30
• class.coursera.org/aofa-004/lecture – Alex Mar 6 '15 at 22:35