Siemens interview question

they asked with leetcode medium of k smallest element