Salesforce | SMTS | Round 1 | Reject
Anonymous User
1290

Q1) Find a number in sorted matrix ii.
Q2) Find kth smallest number in the sorted matrix

Honestly I strugeled to come up with an optimal solution for almost 30 minutes.
Then suddenly it clicked to me, I told the interviewer of how I want to apply the solution. He agreed, I implemented the code, it worked well.

Then there was a follow-up question, find kth smallest elemnet in the sorted matrix, I gave a solution with the max heap, the interviewer said it wont work. I insisted it will, I told him that this may be not the most optimal approach as per the TC but SC is optimized.

The interviewer disagreed. Ultimately the interview was over.

I consider this as a bad luck.

Comments (2)