Test engineer intern Interview Questions
137
Test Engineer Intern interview questions shared by candidates
Q) How would you all values from the nodes of a given binary tree into a string and then deserialize the string and put it back in the binary tree?
3 Answers↳
Read the btree in pre order and and put it in to the string, so that you can deserialize the string to construct the btree as before. Less
↳
This is ridiculously hard question for a SDET Intern position. Yeah, you can do the psuedo code thing with preorder traversal, no biggy, but my understanding is that they actually ask for a real code on the white board. Good luck writing it if you're not a seasoned developer. Less
↳
WTH does deserialize a string mean? Sounds like a geek trying to flex his brain muscles. Less

You have a building with 100 stories. You also have two glass balls. You can drop the glass balls as many times as you want before they break. How can you find the floor at which they start breaking with the fewest number of drops?
3 Answers↳
search for "two egg problem". its a minimization of maximum regret problem http://www.datagenetics.com/blog/july22012/index.html Less
↳
Not truly a brain teaser because the answer is mathematical.
↳
If you have N stories, you use the first glass ball to increment by sqrt(N) stories. Once that ball breaks, you use your second to go to the level of sqrt(N) below where it broke, and increment floor by floor. You know it must break somewhere in that group of sqrt(N) stories. I believe this method gets you a runtime of O(n^0.5). Less


reverse linked list, 1-2-3-4-5 to 5-4-3-2-1
2 Answers↳
void reverse(node *p){ if(p->next->next != NULL){ reverse(p->next); } p->next->next = p; p->next = NULL; } struct typedef node_{ int id; node *next; }node; Less
↳
You need to change the head/root pointer to the last node after reverse.





You are given 8 bottles, 7 of wine and 1 of poison and 3 men. Each man can drink as many bottles as he wants. If a man drinks the poison he dies. without knowing which bottle he drank to death, find the poisoned bottle.
1 Answers↳
Number the bottles: 000 001 010 011 100 101 110 111 Men 1 drinks bottles 001, 011, 101, 111 Men 2 drinks bottles 010, 011, 110, 111 Men 3 drinks bottles 100, 101, 110, 111 According to who dies you get which bottle is poisoned. Less
