Software Engineer in Test Interview Questions
- 0of 0 votes
AnswersWrite a program that print numbers 1to 100 which are divided by 2 and 5.
- Sudhakar August 09, 2009| Report Duplicate | Flag | PURGE
HCL America Software Engineer in Test - 0of 0 votes
AnswersGiven a search engine which uses a cache to store the search results. The size of the cache is 100 records and uses a LRU mechanism. Give test cases to test the features of the search engine, the caching mechanism etc
- Anonymous July 30, 2009| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Testing - 0of 0 votes
AnswersN people in a party. Find a celebrity among them. Celebrity knows nobody else, while everybody else knows him/her. You are required to do this by asking a single question to see if A knows B. The answer is yes or no. What is the minimum number of questions to be ask? What if there doesn't exist such a celebrity?
- Anonymous July 28, 2009| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test - 0of 0 votes
AnswersGiven a sorted linked list, delete all duplicate numbers, leave only distinct numbers from original list. e.g., given 1->2->3->3->4->4->5, return 1->2->5. Given 1->1->1->2->3, return 2->3.
- Anonymous July 28, 2009| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Testing Linked Lists - 0of 0 votes
AnswersWhat is the difference between constant and read only?
- Jackie June 23, 2009| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test C# - 0of 0 votes
AnswersWhat is the difference between string and stringbuilder? When would you use each?
- Jackie June 23, 2009| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test String Manipulation - 0of 0 votes
AnswersWhen is using an interface necessary?
- Jackie June 23, 2009| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Object Oriented Design - 0of 0 votes
Answerswhat's the difference between abstract class and interface?
- Jackie June 19, 2009| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Object Oriented Design - 0of 0 votes
AnswerHow will you test a mouse ?
- CUNOMAD May 25, 2009| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test - 0of 0 votes
AnswersHow will you test a keyboard ?
- CUNOMAD May 25, 2009| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test - 0of 0 votes
AnswersHow will you test a notepad ?
- CUNOMAD May 25, 2009| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test - 0of 0 votes
AnswersGiven two Arrays, there is intersection of elements in these two arrays. So now find all the elements which are common in both these arrays.
- Anonymous May 08, 2009
Suppose there is an element '#' repeated 2 times in both the arrays, then in the output we need to show two '#'s| Report Duplicate | Flag | PURGE
Amazon Software Engineer in Test Arrays - 0of 0 votes
AnswersDiscuss the strategies of how would you check if two folders are in sync or not.(should contain the same files).
- prolificcoder April 27, 2009
Alternative ways and mostly a discussion kind of question| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Ideas - 0of 0 votes
AnswersConvert a binary search tree to a circular sorted linked list. The highest valued node should point to the lowest valued node at each step.
- prolificcoder April 27, 2009| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test C++ Coding Data Structures Linked Lists - 0of 0 votes
AnswersTest a function that sorts a linked list. You have two pointers head which is the original unsorted list and head1 which is said to be the sorted linked list. Return true if head1 did the sorting correctly and return false if not.
bool testlinkedlistsort(Node *head,Node *head1)
I got the solution correct but messed it up while writing it over the white board :|
- prolificcoder April 27, 2009| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test C++ Coding Data Structures Debugging Testing Linked Lists - 0of 0 votes
Answersint getNthNonZeroElement(vector<int> & elements, int n) {
- Han April 09, 2009
vector<int>::iterator i;
int count;
for (i = elements.begin(); i < elements.end(); i++) {
if ((*i) != 0) {
if (count == n) {
return (*i);
}
count++;
}
}
return -1;
}
The above code should return the nth non-zero element. For example, given vector v = [0, 8, 6, 0, 9, 7,20], should return 9 if n pass-in is 3;
Question: optimizing it.
My answer:
int getNthNonZeroElement(vector<int> & elements, int n) {
vector<int>::iterator i;
for (i = elements.begin(); i < elements.end(); i++) {
n -= ((*i) != 0);
if (n == 0) return (*i);
}
return -1;
}
btw, the original question should init count = 0| Report Duplicate | Flag | PURGE
Google Software Engineer in Test Coding - 0of 0 votes
AnswersWrite code to print out a binary tree so that each depth is printed on its own line. The spacing doesn't need to be correct, but the items within a depth must be in order and on a single line.
- Han April 09, 2009
1
/ \
2 3
/ \
4 5
\
7
1
2 3
4 5
7| Report Duplicate | Flag | PURGE
Google Software Engineer in Test Trees and Graphs - 0of 0 votes
AnswersDesign testcases for the strcpy function.
- Anonymous March 27, 2009// Takes two null terminated strings // and copies the chars in src onto dest // including the null character. strcpy(char *dest, char *src);
| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Testing - 0of 0 votes
AnswersHow would you eliminate duplicates in a linked list(singly) without using extra memory. You can use new variables for storing pointers but cannot go on to have a pointer for each node in the list.
- MSrej March 08, 2009
- The values in the node are unicode characters.
- for eg: a->b->c->a->d->NULL
should be transformed to:
a->b->c->d->NULL| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Linked Lists - 1of 0 votes
AnswersThere are two linked lists which converge at one point. Return the 1st node at which they converge
[__]-->[__]-->[__]--> [__]-->[__] [__]-->
Hope my diagram is understandable
- Anonymous February 11, 2009| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Software Engineer in Test Linked Lists - 1of 0 votes
AnswersYou are creating a calculator for a second grader kids.
- Daniel Johnson February 07, 2009
Write a function:
int Calculate(char *in)
where char *in is a string that contains an expression like: "1+2" or "-234334-345345" and you return the results accordingly. It is given that there would be two operands and an operator between them.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test C++ Object Oriented Design - 0of 0 votes
AnswersA binary tree contain integer values (both positive and negative) in its data field. Given a number N, find a path from root to leaf which sums to N.
- Daniel Johnson February 07, 2009
bool ContainsSum(btree *root, int N)
It was simple. By doing a iterative pre-order traversal, and keeping tab of sum of elements, we can easily determine if sum of elements from root to any of the leaves is equals to N.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Data Structures - 1of 1 vote
AnswersThis problem is called Maximum contiguous sub sequence sum problem. I have been asked this question more than once at different interviews at Microsoft.
Given an array which can contain both positive and negative numbers, find the maximum contiguous sub sequence sum.
For example in an array = {2, -3, 4, -5, 6, -3, 8}, it should return 11.
Here was my solution.
- Daniel Johnson February 07, 2009maxsofar = 0 maxendinghere = 0 for i = [0, n) /* invariant: maxendinghere and maxsofar are accurate are accurate for x[0..i-1] */ maxendinghere = max(maxendinghere + x[i], 0) maxsofar = max(maxsofar, maxendinghere)
| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Algorithm - 0of 0 votes
AnswersGiven a set of points in a co-ordinate plane, how can you form a spiral??
- Venkata Sadineni February 07, 2009| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Algorithm - 1of 0 votes
AnswersYou have been given a sorted array which has been rotated unknown number of times.
- Daniel Johnson February 04, 2009
For example: 7 6 5 1 2 3 4
Find the number of times it is rotated. Your algorithm should be less than O(n).
Follow up questions: Test on the following input.
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1....10^10 times 1.
He wanted a foolproof algorithm that will not break on these stress cases. It was for Windows Manageability Group.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test - 2of 2 votes
Answershow would you merge two sorted arrays provided not to use a third array nor u can allocate extra space. try to optimize the problem to the best. time complexity should be less than O(n^2)
- not a looser January 19, 2009| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Software Engineer in Test Arrays - -1of 1 vote
AnswersConsider the problem of building a wall out of 2×1 and 3×1 bricks (horizontal×vertical dimensions) such that, for extra strength, the gaps between horizontally-adjacent bricks never line up in consecutive layers, i.e. never form an internal "running crack". For example, the following 9×3 wall is not acceptable due to the internal running crack shown as a dotted line:
- Anonymous January 11, 2009
There are eight ways of forming a crack-free 9×3 wall, written W(9,3) = 8. Write a program to calculate W(32,10). To get you started, here are a few smaller values:
W(9, 3) = 8
W(18, 5) = 7958| Report Duplicate | Flag | PURGE
Amazon Software Engineer in Test Brain Teasers - 5of 0 votes
AnswersGiven a string where there are numbers and some numbers are repeated, e.g. 13413124...,
- Anonymous December 29, 2008
design a data structure for it and the data structure should store positions of each number.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Algorithm