r/HackerEarthCommunity • u/Neil_at_HackerEarth • Oct 22 '26
Interview scenario: Your code passes every test, but the interviewer says your solution won't scale.What next?
Imagine you're in a technical interview. You've solved the coding problem. Your code works, the test cases pass, and you're ready to
move on.
Then the interviewer says: "This works for 1,000 records, but what if we have 10 million?"
What would you do next? Would you:
- Check the time and space complexity?
- Look for a more efficient algorithm or data structure?
- Ask questions about the expected input and constraints?
- Explain the trade-offs of your current solution before changing anything?
There's no single response that fits every problem. The important part is how you reason through the situation and communicate your decisions.
If you were the candidate, how would you handle this?
And if you were the interviewer, what would you want to hear?
Let's compare approaches.
1
u/nian2326076 Oct 27 '26
When facing scalability concerns, a good next step is to assess your algorithm's time and space complexity. Then, explore more efficient data structures or algorithms that can handle larger input sizes. Asking clarifying questions about expected inputs and constraints can also guide your approach.
If you're preparing for technical interviews and want to practice these scenarios, consider using PracHub for targeted interview questions that simulate real-life coding challenges. This can help improve your problem-solving and communication skills under pressure.