Testing Engineer Interview Questions | Glassdoor

# Testing Engineer Interview Questions

3,257

Testing engineer interview questions shared by candidates

## Top Interview Questions

Sort: RelevancePopular Date

### Design Verification & Test Engineer at Marvell Semiconductor was asked...

Sep 20, 2010
 You have seven stones and a weighing scale. Six of the stones are equal in weight and one is lighter. How will you figure out which one is lighter ? Minimum tries required to do so ? 5 AnswersTrail 1: At random weigh two stones vs. two stones (3 sitting on the side) A: Of the 4 on the scales if one side weighs more then the other then weigh one on each side (since one of them must be heavier) B. If the 2 vs 2 are equal then at random weigh 2 (one on each side) of the three left on the side. If they are the same then the 3rd one that never got weighed is the heaviest. Simple case of process of elimination by grouping (Divide and Test)I would first weigh in one stone, say stone 1, and assume the weight is say 2 lbs(try 1). Then separate the 6 remaining stones into 2 piles, 2,3,4 and 5,6,7. Weigh in either 2,3,4 or 5,6,7, it doesn't matter. Say 2,3,4, if the sum of these 3 is 6 then the lighter stone has to be in the 5,6,7(try 2). Weigh in 5,6, if the sum of the two is 4 then the lighter is stone 7(try3). If sum is less than 4 then weigh in either 5 or 6 to find out. So, the maximum number of tries is 4 and least is 3.Needs two weighing at most: 1. Put {1, 2, 3} on LHS and {4, 5, 6} on RHS. 2. If LHS and RHS are equal 7 is the lighter one. else discard heavier of previously weighed group. Now we have a group 3 stones left. Lets call them A, B, C. 3. Put A on LHS and B on RHS. 4. If LHS and RHS are equal C is the lighter one. else lighter or LHS or RHS is the lighter one. Voila!Show More ResponsesTwo tries. 1st try: 3 : 3, 7th is fake if equal; otherwise, 2nd try: 1:1 picked from the light triple in 1st try. the lighter one is fake if any, the third one fake otherwise.If the stones are made of the same material... they likely have the same density... therefor whichever one looks the smallest, will weigh the least... there... 1 step... just look for the one that is the smallest.

### Software Development Engineer In Test at Amazon was asked...

Jan 27, 2012
 First explain what a tree, then binary tree, then a binary search tree is. Now implement a function that verifies whether a binary tree is a valid binary search tree.5 AnswersSadly I ran out of time for this question. But I e-mailed the response after my time was up. First create a small implementation of a binary tree, I did it in java with the standard implementation Nodes with left and right children as data points. Check whether the left child and right child have valid values, which is to say make sure all children on the right of a node have values greater than parents that they came from. The key thing that I missed during the interview was the fact that if you traverse once to the right, then once to the left, you have to make sure the value is between the max and min that you've encountered up to that point.int validate_BST(struct tnode *tree){ int ret1, ret2; if (tree == NULL) return 1; else { if (tree->left != NULL){ if (tree->data > tree-left->data){ ret1 = validate_BSR(tree->left); } else return 0; } if (tree->right != NULL) { if (tree->data right->data){ ret2 = vaidate_BSD(tree->right); } else return 0; } return (ret1 == 1 && ret2 == 1)? 1: 0; } return 0; }To find whether a binary tree is valid Binary search tree, do inorder traversal and check if the nodes are sorted.Show More Responsesprivate boolean isBST(){ return isBST(root, Integer.MIN_VALUE, Integer.MAX_VALUE); } private boolean isBST(Node node, int min, int max){ if(node == null) return true; if(node.data max) return false; else return (isBST(node.left, min, node.data) && isBST(node.right, node.data+1, max)); }In order to verify the Binary Search Tree, Read the nodes in Inorder mode. Also at every step check if the current node value is less than the one previously found then exit the traversal as the items are not sorted.

Sep 26, 2012

### Test Engineer at Qualcomm was asked...

Feb 7, 2014
 Talk about how to verify if an RF amplifier is operating in its linear mode?4 AnswersObserve the IM3. Back off input by 1dB and see how much IM3 changes.hi, did you applied for system test engineer? If yes, can I ask some detailed question? Thank you!Yes.Show More Responseshi, can you send me your email address? Mine is dayuallen@gmail.com, thank you.

### Software Design Engineer In Test at Amazon was asked...

Jul 28, 2012
 find if 2 strings are anagrams5 AnswershashHash what, lol ? :))) You simply need to alphabetically sort characters in strings and then compare the result.think about the time complexity. Whats the time complexity of the sorting? NlogN And when using hash mapping, it can be only N. Mapping the string to an alphabet array, the index is the char and the value stores the frequency of the char. Hope it helps.Show More Responseseasiest way probably to reduce the characters to ascii, add them all together. If values are equal, they all contain the same characters. O(n)Just reverse one string and then compare the result with other string.

Feb 19, 2013

Nov 11, 2013

Jun 7, 2010