interview-questions

What is an easy way to tell if a list of words are anagrams of each other?

I was asked this one when I applied for my current job. ...

How do I recursively list all directories at a location, breadth-first?

Breadth-first list is important, here. Also, limiting the depth searched would be nice. $ find . -type d /foo /foo/subfoo /foo/subfoo/subsub /foo/subfoo/subsub/subsubsub /bar /bar/subbar $ find . -type d -depth /foo/subfoo/subsub/subsubsub /foo/subfoo/subsub /foo/subfoo /foo /bar/subbar /bar $ < what goes here? > /foo /bar /foo/subfoo...

Junior Engineer Interviewing Senior Engineer - Need Questions

I am a Junior Engineer with under a year experience, primarily as a UI developer. We have a former Lead Programmer who just got laid off who is interviewing at our company, and I am one of the people interviewing him. He has almost 25 years of experience, so obviously it will be pointless to ask him technical questions. As a junior prog...

Unusual programming interview questions

I have an interest in particularly odd yet relevant questions to root out guys who claim to have several years in a particular programming language. Since I know C best, I'll start with one of my favorites: Is it possible (other than branching into the twilight zone) for a function to return more often than it is called? You guys shou...

Counting nodes in a tree in Java

Hi, First of all, I swear this is not homework, it's a question I was asked in an interview. I think I made a mess of it (though I did realise the solution requires recursion). Here is the question: Implement the count() method which returns the number of nodes in a tree. If a node doesn't have either a left or right child, the relevan...

Write code to make CPU usage display a sine wave

Write code in your favorite language and let Windows Task Manager represent a sine wave in CPU Usage History. This is a technical interview quiz from Microsoft China. I think it's a good question. Especially it's worth knowing how candidate understand and figure out the solution. Edit: It's a good point if may involve multi-cor...

Optimum search for k minimum values in unsorted list of integers

I was just interviewed with a question, and I'm curious what the answer ought to be. The problem was, essentially: Say you have an unsorted list of n integers. How do you find the k minimum values in this list? That is, if you have a list of [10, 11, 24, 12, 13] and are looking for the 2 minimum values, you'd get [10, 11]. I've got an ...

How to interview automation tester?

I have to interview automation testers, with experience in commercial tools like QTP, Rational Functional tester, open source tools like Watir etc. What interview strategy should I have? ...

Hiring a programmer: looking for the "right attitude"

It's actually two questions in one: What is the right attitude for a programmer? How do you (or would you) look for one when interviewing or during hiring process? Please note this question is not about personality or traits of a candidate, it is about their attitude towards what they do for living. This is also not about reverse of ...

Algorithm to find the maximum subsequence of an array of positive numbers . Catch : No adjacent elements allowed

For example , given A = [1,51,3,1,100,199,3], maxSum = 51 + 1 + 199 = 251. clearly max(oddIndexSum,evenIndexSum) does not work. The main problem I have is that I can't come up with a selection criterion for an element. A rejection criterion is trivial given a selection criterion. The standard maximum sub-sequence algorithm doesn't se...

What are some good interview questions for a potential Flex developer?

I plan on interviewing Flex candidates in the near future and I'm looking for some good (read: not incredibly difficult) Flex development questions. Any input from the Stackoverflow community? If you post a possible question, the answer is also appreciated (but not required). ...

Testing any web page approach

How should one approach testing a web page with tabs (linking to other pages), frames or form? What should be the general methodology? What could be the various test cases? I was asked this interview for a Junior QA Engineer position without requiring to be very specific. And, I couldn't comprehend the question very clearly. Some of t...

Sample C++ tests

I'm about to take a C++ test. But I only get one crack at it to get over 85%. If I don't push over that, then I don't get the job. The problem with these tests are that they typically target generic C++, and depending on what libraries you use your definition of generic may differ. STL and Boost may seem logical to some (and should...

Interview questions for user interface/data visualization design?

There are a ton of lists out there of interview questions to test the candidate's programming aptitude. But my company is very UI-focused, and everyone is expected to be able to both code and design a decent UI. So once I've seen that the candidate can implement recursive Fibonacci and tell me its orders of growth in time and space, I ...

What does .NET developers need to know about these certain topics?

I would like the SO community let me know what does juniors and proficient .NET Developers should know regarding the following subjects, also some code examples or brainteasers like the ones here will help a lot. System Types Collection and Generics Configuration and Installation Monitoring and Debugging File I/O Globalization ...

How to deal with a "show making" interviewer?

After applying for a job as a .NET Developer, and after the guys at the company which I was applying to join got interested in my resume, they scheduled an interview, just like a very normal hiring process. The different thing here is, the interviewer was really showing off on me today. He kept asking questions about some advanced C++ ...

What is the most constructive way to code-review an interview submission?

As part of our interview process, we ask candidates to complete a coding problem of moderate complexity. Some candidates seem to spend an awful long time on it and produce code that is not of high enough quality. It can be difficult to document what "high enough quality" actually is and provide feedback that is as useful and objective a...

Does MS T-SQL include a data type called varchar2? and if so, what's the difference between it and between varchar?

Had this question in an interview. ...

How to prepare for a interview test in understanding foreign source code?

Hi, recently I had a job interview where I had to present self-written code and explain the programm architecture and design, had to take a look at company source code, explain what I understand of this source code sections presented (it was the domain model of an application) and had to modify the code to let the program work a little...

How do you structure interview questions about a candidates background?

I usually start interviews for technical candidates by having them tell me about their background and prior work experience. I do this for two reasons: I want them to talk about things they know well so that they'll loosen up, and get more comfortable with the interview, so when I grill them on technical questions, I'll get an accurat...