Software Engineer Interview Questions in Washington, DC | Glassdoor

Software Engineer Interview Questions in Washington, DC

Software engineers write programs to design and develop computer software. Interviews are highly technical, so come ready to work through coding problems and math brainteasers. The specific questions you are asked will depend on what type of programming position you are looking for. Try researching a specific software discipline such as web development, application development, or system development.

Top Interview Questions

Sort: RelevancePopular Date

How would you find a duplicate number in a very large unsorted array of ints.

4 Answers

findDuplicates(int array[]) { int duplicates[] , index; for (int i=0; ii; j--) { if (array[i] == array[j]) { duplicates[index++] = array[i]; break; } } print duplicates;

O(n^2) is the usual naive answer but there are properties that if true can reduce this to O(n) using bit ops: In general, if the given array range can also be generated where the duplicated number you are trying to find gets no special treatment and is included just like all the rest a single time, then you can get the answer this way: set total to 0 foreach (n in given array) xor all n into total foreach (n in generated range) xor all n into total total is your answer This works because all the non-duplicated single entries will cancel out via xor with their single entry from the generated set (since they are all paired) and the duplicated number will have an extra odd entry (since it will have 2 entries already from the given array + 1 from the generated set = 3 entries). And because of course xor is commutative; the order of the xor'ing doesn't matter: 6^6^5^5^4^4 = 0, as does 6^5^4^5^4^6 It is a variation of these problems: - find a missing number in an unsorted array - find an unduplicated number in an unsorted array of duplicates

I should have added t the above: Ask the interviewer if the array of N has any special distribution. In particular, for the duplicate question here, ask if the array of N contains [0, N-2] or [1, N-1] values unsorted, in addition to one extra entry duplicated in that set duplicated.

The brain teaser: what is the last digit of 2007 power 2007

4 Answers

to developd to class software describe it

3 Answers

2 - in C#, can you tell whether whatever the user has input is a string or integer?

3 Answers

Division method without using divide operator

4 Answers

Implement a queue using only stacks.

4 Answers

I thought they were all okay except for one about finding all anagrams of a given word in a dictionary efficiently. They asked one about 7 coins that are the same weight and one that is heavier - and finding that one with one balance.

2 Answers

Check if a string is a rotation of another string

2 Answers

What is the range of numbers that can be stored using a single byte?

2 Answers

A very hard brain teaser that requires creativity. You don't necessarily have to get the right answer, but you have to come up with some intelligent ways of tackling the problem. Don't be afraid to talk about your thought process, even if it's not right.

2 Answers