Citi Interview Question

How to get the kth smallest element in a database?

Interview Answer

Anonymous

Dec 2, 2023

You sort the table in descending order. Then the interviewer helped me with the limit keyword where you limit your answer to the first k fields. And then I said you sort in ascending order. This was incomplete. The correct answer should also included to then limit the answer to only 1 field.