I'm definitely done for after today's interview, no need to even think about it. I'm sharing my experience, and I'd also like everyone to help me critique it.
The interviewer didn't introduce himself and there was no BQ. He just told me to open CoderPad and start writing a problem. The problem was progressive, and I could only use Java. It wasn't hard at all. There's a store, you're given an opening time, and you write a query for whether it's open. Then he added days of the week: open Monday to Friday, and you query by time. Then he added that the open hours each day come in segments, for example 8-10 and 14-20, but every day is the same. The last part was that the open hours can cross midnight. For example, the store is open on Friday and Saturday, from 22:00 to 2:00. There's a corner case here, Sunday into Monday. I mentioned that too.
Because the input changed a bit, I asked his permission whenever the input format changed. For example, for a time like 22:10, I wrote it as hour = 22, min = 10, and he said that was fine. I kept the original function and explained that I was overloading it, so it could still be called. I wrote for a full 50 minutes, and everything ran.
At the end he asked, how do you think your readability is? One sentence, and I instantly got alarmed, but there was no time left. He had already closed CoderPad, and I figured that was it. I gave a short explanation, he said okay, and he left the call. Ugh, so that's what he was waiting for me with the whole time.
Discussion
Loading comments…