Find kth element and sliding-window kth in stream | xAI Coding Question