I got all nervous & flustered, but then I warmed up….
He was like write me a function to reverse strings, preferrably in place. At first I pulled out pen & paper, but it wasn’t coming to me. Then I opened up emacs, & the juice started to flow again. I’m not sure if my function puts the terminating null at the beginning, and I did confuse a variable name, and I forgot to return. Did I mention I was flustered? Fortunately, the confusion was probably unnoticed, and the method was basically sound. Phones, bleh!
Then another one where I was reducing the order of a function from the obvious O(n^2) implementation (well, he didn’t give the O(n^2) implementation, but it was, as I say, obvious. I got it down to O(n*log(n)) with little prompting (sort first, then do something qsort-esque for a linear time implementation), and then, with a moderate amount of prompting, down to O(n) (lookup tables, it’s all about the lookup tables).
Some object oriented design questions. I had the technicalities right, and I gave strong stylistic reasons, and after prompting, gave the technical reasons for a virtual function in a toy example.
For the last technical question, we played with in order and pre order binary tree traversals. My intuition was completely correct, my solution was suboptimal, but good.
He asked about my goal of being a contractor on my resume, and I assured him I was looking for something full-time-ish with them. I asked for the next step, “I’ll give them my evaluation and our people will call you, and possibly schedule an in person interview”, and then asked for the insider’s perspective on what they did. His answer added some to the description, but more by way of flavor than detail.
I think I did well. All the right answers, if not exactly smooth. We shall see what comes of it. Laundry, and work, and stuff. I may not say much before monday. Wish me luck.
It sounds like you did fine. It’s a technical interview, so nervous & flustered is okay, as long as you wow them with your technical skillez, which I think you did.
You also avoided the common trap of dodging the question by asking “What are you wearing?” in a low, sultry voice and then sighing heavily.
I’ve made that mistake more than a few times.