Millennium interview question

Graph traversal, K-th smallest element