Test Engineer Interview Questions | Glassdoor

# Test Engineer Interview Questions

2,319

Test engineer interview questions shared by candidates

## Top Interview Questions

Sort: Relevance Popular Date

### 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 Answers Sadly 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 Responses private 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.

### Software Development Engineer In Test (SDET) at Microsoft was asked...

May 13, 2013
 Given a binary tree, how would you set the keys/values of all the nodes and their child pointers to null. No language restriction. Do it iteratively in O(N) time with O(1) space complexity where N is the number of nodes in the tree. Other Details: - Tree is just a regular Binary Tree and doesn't have the BST property. - It is not guaranteed to be balanced. - You may do whatever you want to the tree however, you must ensure that all the nodes in the tree and their left/right pointers are set to null. 5 Answers I will leave the reader to think about the question. Suffice it to say, focus on the fact that you can alter the structure of the tree... Do a post-order traversal, set node to null as it recurse back? void setNodesToNull(Node root) { if (root == null) return; setNodesToNull(root.left); setNodesToNull(root.right); root = null; return; } Nevermind, it has to be done "iteratively". Show More Responses With the assumption that you do not have to preserve the initial tree couldn't you just iteratively continue to remove the root of the initial tree, set to null, replace root with child and with the null root build a new tree? What if you have two child nodes? How do you ensure that you are not loosing a reference to a child node before you have the opportunity to 'free' it?

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

Jul 28, 2012
 find if 2 strings are anagrams 5 Answers hash Hash 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 Responses easiest 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

### 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 Answers Observe 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 Responses hi, can you send me your email address? Mine is dayuallen@gmail.com, thank you.

### Software Development Engineer In Test Consultant at HCL Technologies was asked...

Aug 29, 2009
 What is a class? 4 Answers Just because you have years of programming experience, doesn't mean you won’t be asked entry-level question. Prepare for this. This is a reasonable question for a senior person - you should be able to explain basics to a client, manager or junior person. So a answer could be: A class is a group of objects with shared properties. Using classes reduces time needed for new coding and simplifies changes. Take responsibility for your actions. For someone with that much experience, you can't answer this stupid question? I do interviews and hires and if you gave me that lame excuse, I would terminate the interview on the spot. Every resume I look at looks the same (same experience, job titles, job responsibility). You need to make the difference in the interview, this is what distinguish you from the other 100 candidates. Hate to say it but, with the economy the way it is, it is easier to be choosy on who I hire. Show More Responses This guy (interview candidate) is hilarious, those three questions are the most fundamental concept of OOP, and he consider OOP entry-level? LOL. What have you done at Microsoft? Non-programming related job? Go back to any college and take a CIS 200 level class. Experience at Microsoft is not a pass for interview questions.

Sep 26, 2012

Jun 7, 2010