That was actually a nice question: If you wanted to dive a little deeper, you could ask the candidate to sketch in unit tests. And if you’re talking to somebody super-technical, ask “Your code is in production and sometimes it’s throwing illegal-index exceptions under heavy load. What’s going on and how do you fix it?” Just because that’s a cool problem, very real-life, and most people smile when they get it."
Genuinely curious as to what the reasons for illegal-index exceptions under heavy load would be? I genuinely can't think of any reason. Perhaps the problem is under specified. Unit-testing would need to be seeded to be reproducible.