Possible Duplicate:
How to find the kth largest element in an unsorted array of length n in O(n)?
I'm currently sitting in front of an course assignment. The task is to find the nth-smallest element in an array. (Without sorting it!)
I tried to understand the BFPRT algorithm but from what I got it is only useful if you want to calculate the median and not the "n-th smallest" element.
Another idea I had, was to convert the array into a tree by attaching smaller/bigger nodes to the left/right of the root node. I'm not sure however if this counts as sorting. To accelerate this I could store the number of subnodes in each node.
The complete assignment also includes that the algorithm has to be recursive. There is also the hint to think about other data structures.
What do you think about my idea of transforming the array into a balanced tree?
Are there any other options I might have missed?
EDIT: I looked at various similar questions but were not able to completely understand the answers/apply them to my specific task.