I have yet to apply at a technical support center. I've applied for plenty of software engineer positions regardless of not having a formal college/university degree. A lot of the places that I've applied to use technologies I have a strong disdain for though. (I am not a fan of C#, for example. I much prefer C for personal projects and C++ for larger team-based projects.)
Some of the questions I remember most are language agnostic though. One was: "If you were processing a black and white image, how would you calculate how much of the image is black and how much of it is white?"
The naive approach for that is to keep a count of just the white (or black) pixels then compare to the number of pixels in the image and there ya go. In terms of implementation I would want to know how big the average image being processed is, and how many images need to be processed at a time.
Quote: "Can you program an implementation of atoi() (string to integer for those who don't know C)?"
I've done this before. Here's a new implementation (should be easy to read):
http://codepad.org/HAbX1NiI
Quote: "Given two sorted arrays A and B and an integer k, find the kth element in the merger of the two arrays. Figuring out an answer isn't that bad, but getting the proper, fast run time answer is trickier."
What is the "proper, fast run time answer" in this case? The naive implementation should suffice I would think.
Quote: "Given a file where each line is a sorted sequence of integers separated by spaces, write code to parse the file and create an output file containing only the numbers that appear in each line of the input."
Depending on the number of inputs I would store the input numbers in a binary tree (possibly a B+ tree if there will be over 20k unique inputs). If the actual range of the inputs is relatively small (that is, small enough that the number of inputs as bits would fit within the memory budget for the program) then a simple bitset could be used. The bitset would be initially cleared with each input setting the corresponding bit in the set. The program would just test the bits.
----------------
I never get asked any fun questions in interviews. Nothing too challenging. I'd rather be given a laptop and an hour, lol.
Here's a good question for an interviewee though (I haven't personally been asked this): How do you remove an element from a binary tree while keeping the tree intact?
Even if the interviewee gets it wrong, seeing the thought process for solving that sort of problem would be good for determining whether their problem solving skills are on an acceptable level. (I remember figuring this out on paper once.)
Web -
Tweets
“I'm going to punch DXGI in the face. Repeatedly.” ~Aras Pranckevicius