Software quality engineer Interview Questions in United States | Glassdoor.co.in

# Software quality engineer Interview Questions in United States

837

software quality engineer interview questions shared by candidates

## Top Interview Questions

Sort: RelevancePopular Date

6 Oct 2010

19 Dec 2011

### Software QA Engineer at eBay was asked...

13 Jun 2011
 how to find the closest 2 number in an array of unique positive number5 Answersasked during phone interviewOne solution is to sort the array, then iterate through all neighboring pairs to find the pair with smallest difference. This is O(NlogN) solution. If the integers are bounded, you may be able to sort in O(N) time for an O(N) solution.public static int[] find2Closest(int[] myArray) { assert(myArray.length >= 2): "myArray needs to be larger than 2"; Arrays.sort(myArray); //quickSort int indexMin1 = 0; int indexMin2 = 1; int min = myArray[indexMin1] - myArray[indexMin2]; for(int k = 0; k < myArray.length-1; k++) { int difference = Math.abs(myArray[k] - myArray[k+1]); if(difference < min) { min = difference; indexMin1 = k; indexMin2 = k+1; } } int[] values = new int[2]; values[0] = myArray[indexMin1]; values[1] = myArray[indexMin2]; return values; }Show more responsespublic class ClosestTwoNumber { public int[] findClosest2Number(int[] arr){ if(arr == null || arr.length diff) { min = diff; num1 = arr[i - 1]; num2 = arr[i]; } } if (num1 == -1 || num2 == -1) { throw new IllegalArgumentException(); } int[] result = new int[2]; result[0] = num1; result[1] = num2; return result; }public class ClosestTwoNumber { public int[] findClosest2Number(int[] arr){ if(arr == null || arr.length diff) { min = diff; num1 = arr[i - 1]; num2 = arr[i]; } } if (num1 == -1 || num2 == -1) { throw new IllegalArgumentException(); } int[] result = new int[2]; result[0] = num1; result[1] = num2; return result; }

### QA Software Engineer at eBay was asked...

8 Feb 2011
 You have five bottles with pills. One bottle has 9 gram pills, the others have 10 gram pills. You have a scale that can only be used once. How can you find out which bottle contains the 9 gram pills?5 AnswersNumber the bottles 1-5. Collect a number of pills from each bottle corresponding to their bottle number. So, 1 pill from bottle 1, 2 from bottle 2, etc. If they all had 10 gram pills they should weigh 150 grams. The difference will be the number of the bottle the 9 gram pill came from. Example, bottle 3 has the 9 gram pills. Total weight read will be 147 grams. The difference of 3 is the bottle it came from.Did u get the job? What was team where you interviewed for ?Read the label on the bottle.Show more responsesPlace all five bottles on the scale. It should say 49 grams on the scale. If you take out one bottle each time. Subtract the scale from before and after the bottle that has been taken off the scale. If it's 9. That's the bottle you're looking at.What top poster said except you can label the bottles from 0 to 4 and save yourself a little work

### Software QA Engineer at Apple was asked...

22 Mar 2011
 how to test a toaster?5 AnswersPlug the toaster into a PowerPoint. Turn the power point on. Place required number of slices of untoasted bread in the toaster - dependant on slots available. Press the Press the lever down to lower the toast into the toaster.Contined...prior to lowering the bread into the toaster select the lowest heat setting. Once the bread is lowered set a timer to measure length of time before toast cycle completes and toasted bread pops up. Retest on all other heat settings and time each of these.I would find a tester and I'd tell him/her to test the toaster by plugging it in. If the toaster doesn't toast the tester, it works; if it toasts the tester, it's broken.Show more responsesDid not understand this part of your answer, could you please eloborate. "If the toaster doesn't toast the tester, it works; if it toasts the tester, it's broken."He means "if you don't get electrocuted then the toaster works. If you die of electrocution then the toaster is broken" lol

5 Apr 2013

### Software Quality Engineer at MicroStrategy was asked...

14 May 2013
 The brain teaser: what is the last digit of 2007 power 20074 AnswersI first was scared by this question, but after a few seconds, I figure out how to answer it with recursion.Last digit of 7^1 is 7. last digit of 7^2 is 9. Last digit of 7^3 is 3. Last digit of 7^4 is 1. After this, the last digits repeat in the same pattern. 2007 divided by 4 is 501 with reminder is 3. Therefore the last digit is not 7, not 9, but 3. (the third case).Answer: Concept: for n^n multiple resultant number in units place n-1 times with n. Answer: Just multiply the units place of the result wit 7 , six times.. i.e 1st iteration- 7 x 7 = 49 take number in units place i.e 9 mul by 7--> 2nd iteration- 9 x 7 = 63 3rd iteration- 3 x 7=21 4th iteration- 1 x 7=7 5th iteration- 7x7=49 6th iteration- 9 x 7=63 Note we have to take only 6 iterations because we have already considered 7 twice in the first iteration. i.e 7 multiplied by SIX 7s So the digit would be 3.Show more responsessimple solution is : 7^1 = 7 7^2 = 9 7^3 = 3 7^4 = 1 7^5 = 7 7^6 = 9 7^7 = 3 7^8 = 1 so pattern follows in 4 part so 2007 mod 4 = 3 so Third pattern answer is 3

### Software QA Engineer at Apple was asked...

10 Jun 2012
 Why do you want to work for Apple3 AnswersApple is quite known company, a lot of things I read or heard about it, but never experienced by myself. To work for Apple is a big honor and opportunity to develop my self. Also to exercise myself, what can I do to reach goals and just enjoy to workI like it.Hahahabecause i cant get into google.

### Software Quality Engineer at MicroStrategy was asked...

3 Mar 2013
 There are 4 people going through a bridge. One takes 5-min, one takes 1-min, one takes 2-min, and one takes 10-min. And only two people can go through once. Question: what is the shortest time that 4 people cross the bridge?4 AnswersIts a common puzzle but your question is incomplete. the two people can only cross the bridge by using a torch. So one guy will always hold the torch. Solution: first 10 & 1 will go and then 1 will return back. - total time = 10+1 = 11 mins then 1 & 5 will go and 1 will return back - total time = 5+1 = 6 mins then 1&2 will go = total time = 2mins total time = 19 mins !!Correct answer is 17. -> 2+1 :2 10+5 :10 1+2 :2if no pass, then 12 mins, if someone can pass through another, then 10 mins.Show more responsesYou go over a bridge not through. If only 2 people can go over once than others can go over more than once. 1 min travel time passes four times in a total 4mins. Or you could write the question properly

### Software QA Engineer at Transaction Network Services was asked...

28 Sep 2018
 Q9: What shell command renames filename1 to filename2?3 AnswersA9: cp filename1 filename2.mvmv filename1 filename2
110 of 837 Interview Questions