You're sweating. 😓
"How to find the k-th largest element in an unsorted list?"
Her question asked seconds earlier is still hurling through your head.
You know that the token is on you, but you cannot think of anything. You're blacked out. Damn!
It's getting uncomfortable. Seconds pass, but she seems to be unimpressed by the tension in the room. The question demands an answer. Any answer. NOW!
So you stumble:
"Ehhm - the trivial approach would be to first sort the list and then access the k-th element using simple indexing?"
For a second, she keeps looking at you with a subtle grin of superiority. She trapped you, and you both know it.
"Well. Is this the best you can do?"
To gain some time, you bluff back:
"No! We don't have to sort the whole list if we're just interested in the k-th largest element."
And as you listen to your own words, it all comes back. You feel a rush of relief and, yes, some excitement because you've figured it out in your head - now it's going to be easy.
"But there is a better solution! ..."
Fortunately, you've learned this solution idea in a Finxter Course a while back when you didn't even know you'd need it one day.
This is the course your future self refers to!
The course is a series of tutorials by Finxter star creator Shubham, who diligently went through 20 real-world interview questions that are super popular in coding interviews.
All questions are drawn from actual Google code interviews, but they are highly relevant not only for Google interviews but for all FAANG and tech interviews.
And if you're just in it for fun and learning and you love cracking some interesting coding challenges yourself in your leisure time, this is the right course for you as well!