interview-questions

Swap the values of two variables without using third variable

How many different ways can you come up with to swap the values of two variables without using any third variable ? I use this one: a^=b^=a^=b ...

Programming Riddle: How might you translate an Excel column name to a number?

I was recently asked in a job interview to resolve a programming puzzle that I thought it would be interesting to share. It's about translating Excel column letters to actual numbers, if you recall, Excel names its columns with letters from A to Z, and then the sequence goes AA, AB, AC... AZ, BA, BB, etc. You have to write a function th...

Amazon Interview Question: Design an OO parking lot

Design an OO parking lot. What classes and functions will it have. It should say, full, empty and also be able to find spot for Valet parking. The lot has 3 different types of parking: regular, handicapped and compact. Thanks! ...

TSQL interview questions you ask..

Google search turns up some links to tsql questions. I was wondering what would SO experts would ask in an interview for TSQL. ...

How to tell if an Agile team is doing it right

I just applied for a job doing Agile development. I've never done it before, though I'm aware of the basics. I'm otherwise well-qualified, and they didn't even mention Agile experience in the requirements, so I'm likely to get an interview. I'm afraid that they are doing it all wrong - not "Agile development" but instead "too overwork...

Reversing a string in C

I have developed a reverse-string program. I am wondering if there is a better way to do this, and if my code has any potential problems. I am looking to practice some advanced features of C. char* reverse_string(char *str) { char temp; size_t len = strlen(str) - 1; size_t i; size_t k = len; for(i = 0; i < len; i++) { temp = str[k]; ...

What are typical questions good programmers should be able to answer?

Every once in a while I read about a job interview for programmers and I find myself wondering if I would have been able to answer some of these questions, because although I learnt programming at school, I find myself incapable of answering some of them. Is it because I have read the wrong books or messed with the wrong language (C++)? ...

I'm interviewing for a j2EE position using the Spring Framework; help me brush up

I'll be interviewing for a J2EE job using the Spring Framework next week. I've used Spring in my last couple of positions, but I probably want to brush up on it. What should I keep in mind, and what web sites should look at, to brush up? ...

Good Architecture Interview Questions

What are some good questions to ask in an interview to see how much the applicant knows about architecture? ...

Practical intervew questions that apply to any coding language

background info... When interviewing candidates we do the usual round up of questions (both coding and not) and we follow with a particular scenario where we ask the interviewee to code a given problem. We then follow the work with such questions as why did you do this, why not this, how would you handle the exception here, why did you...

Is this interview question too hard for a php dev. job?

We're looking for someone to help us enhance & maintain our high-quality, php-based prototype of a transactional web app. Ideally, who can communicate well, and do both front- and back-end web development (as well as smart/gets things done, etc.). Among other more general things, I've been using this question: Given this: $foo = ...

In .Net, is it possible to use Response.Write in a class that does not inherit from System.Web.UI.Page

Just been asked this question as a true / false in a telephone job interview and was a little stumped. Any ideas? ...

Is the CareerCup Book Worth the money?

I just couldnt find a decent review of this book http://www.careercup.com/ Has anyone in this community tried it? Do you know any other alternatives? Do you have any other similar book recommendations for techies entering the job market? Thanks. ...

All possible values of int from the smallest to the largest, using Java.

Write a program to print out all possible values of int data type from the smallest to the largest, using Java. Some notable solutions as of 8th of May 2009, 10:44 GMT: 1) Daniel Lew was the first to post correctly working code. 2) Kris has provided the simplest solution for the given problem. 3) Tom Hawtin - tackline, came up arguab...

Check if a number is divisible by 3

Write code to determine if a number is divisible by 3. The input to the function is a single bit, 0 or 1, and the output should be 1 if the number received so far is the binary representation of a number divisible by 3, otherwise zero. Examples: input "0": (0) output 1 inputs "1,0,0": (4) output 0 inputs "1,1,0,0": (6) out...

How to convert an arbitrary large integer from base 10 to base 16?

The program requires an input of an arbitrary large unsigned integer which is expressed as one string in base 10. The outputs is another string that expresses the integer in base 16. For example, the input is "1234567890987654321234567890987654321234567890987654321", and the output shall be "CE3B5A137DD015278E09864703E4FF9952FF6B62C1CB1...

Can asking a developer whether he prefers WebForms or MVC be a good indicator of his proficiency?

I've just had an interesting thought. It has been a while already since some of us have enjoyed the new MVC framework for ASP.NET. We have talked about it, compared them, liked or disliked one or the other at a different point of time, argued about them each protecting his own point of view. Now it is somewhat silent. He who wanted to g...

how many ways are there to see if a number is even, and which one is the fastest and clearest?

given any number, what's the best way to determine it is even? how many methods can you think of, and what is the fastest way and clearest way? ...

Interview qns...Do the below without any conditional or comparison operator.

Hi All, Do the below without any conditional or comparison operator. if (Number <= 0) { Print '0'; } else { print Number; } thanks.. ...

Oracle - NULLS in foreign keys?

Hi, I'm trying to answer the following question... "Explain the issues that arise when NULLs are present in columns that make up foreign keys. Discuss how ANSI have attempted to resolve this issue with the three 'matching rules' that can be adopted when using concatenated foreign keys." Can anyone point me in the right direction as to...