Controls engineer Interview Questions
controls engineer interview questions shared by candidates
Top Interview Questions
QA Automation Engineer at Workday was asked...
Do you believe automation is more important than manual QA? 3 AnswersI won't believe, both r important. we are doing documentation and writing test cases manually, then we are converting manual test cases into test scripts and executing them. It is the process of testing life cycle. Your question is somewhat vague. When it comes to service tests then automation is more important; When it comes to graphic design manual is more important. when it comes to regression tests automation is more important than manual testing. In these sorts of interviews you really need to drill down and understand what the interviewer is looking for. A good way to simulate a real interview experience is to do a mock with one of the Workday QA Automation Engineer experts on Prepfully, rated super strongly on TrustPilot... prepfully.com/practice-interviews |
Hypothetical question: you have a team of ten software developers that have worked on a product for 5 years. They now have to develop a new version of this application but only have 3 months to develop and test it. What would the QA estimate be? 2 AnswersThis was my favorite question as it completely illustrated how bad these guys were at interviewing. I began to ask the manager that asked the question for more information and he snapped back at me " You have all the information you need!" Really? He might as well have asked me how much it costs to build a house. Because the answer would be the same - "I need more info and detail in order to give you my estimate". Any QA worth their salt will asks tons of questions in order to understand what it is they are working on. In the end I told the panel that if I had worked on the product or similar products I would base my estimate on prior experience. If I had no prior experience I would research historical metrics from similar projects and also discuss those historical project actual development/test hours with other QA and developers to come up with an estimate. I said "Rather than answering with the standard 'I will need more information' 'lets make it less hypothetical. "'Before I can give you an answer I will need to gather more information from your people'. This gives the interviewer an out when they don't have any additional information, and you the chance to get the information you need" Converting from 'Hypothetical' to 'Real' helped make my answer stand out from other candidates. It also made it harder for the interviewer to return with the Hypothetical "you have all the information you need" |
Lead QA Engineer at ArbiterSports was asked...
What exact experience with test automation have you had? 1 AnswerAutomation starts when UAT becomes stable. Say for instance if on each release more than 50% test are failing you don't automate the application. During this time you can run smoke or black box tests to check if major functionalities are working properly. Once it becomes more stable for instance if 20% tests are failing you can start the automation process. Depending upon the application one can start with developing the frameworks. if it needed to be a data driven framework or a key word dirven framework. The best practice will be to incorporate Hybril Framwork which is combination of both keyword and data driven frameworks. On every release you run your regression tests to check new functionalities and anything broken from the previous releases. Once the application comes closer to complition you can develop a happy path or end to end test to check the functionalities of the application. |
If you had a great idea to implement something new for a CA software product but management wouldn't take your word on it, how would you convince management to go along with your idea? 1 AnswerI would try to create a form of a prototype of said idea and present it along with taking ownership and compassion for the new feature. |
what automation tool you have been using for your last project 1 AnswerHP uft, LR, Selenium, badboy |
Software QA Engineer at Apple was asked...
There are three boxes, one contains only apples, one contains only oranges, and one contains both apples and oranges. The boxes have been incorrectly labeled such that no label identifies the actual contents of the box it labels. Opening just one box, and without looking in the box, you take out one piece of fruit. By looking at the fruit, how can you immediately label all of the boxes correctly? 47 AnswersAll the three boxes are names incorrectly. SO the bax lebeled Apples+Oranges contains only Oranges or Only Apples. Pick one fruit from it. If it is Orange then lebel the box as Orange. So the box lebeled Oranges contains Apples and the remaining contains both. Label the boxes fruit. The key bit is "All the three boxes are names incorrectly" so the label on the box which fruit comes from will need to be changes to one of the other 2 labels. It can only be 1 of them (and it will be obvious when you have the fruit) then the remaining box (that hasnt featured yet)...Just swap that label with fruit box that was originally on the box which you took the fruit out of Thats hard for anybody to understand somebody elses explanation... eaiest way is to just do an example Show More Responses Swaz answer is almost correct however it does not work in all scenarios. lets assume: box 1 is labelled Oranges (O) box 2 is labelled Apples (A) box 3 is labelled Apples and Oranges (A+O) and that ALL THREE BOXES ARE LABELLED INCORRECTLY" Pick a fruit from box 1, 1) if you pick an Orange: - box 1's real label can only be O or A+O - box 1's current label is O - since ALL LABELS ARE INCORRECT then box 1's real label can not be O - box 1's new label should then be A+O by elimination - since ALL LABELS ARE INCORRECT - box 2's label is changed to O - box 3's label is changed to A - SOLVED 2) if you pick an Apple: - box 1's real label can only be A or A+O - box 1's current label is O - since ALL LABELS ARE INCORRECT then box 1's real label can not be O - this still leaves us with the choice between label A and label A+O - which would both be correct - FAILURE Solution: The trick is to actually pick a fruit from the A+O labeled box Pick a fruit from box 3: 1) if you pick an Orange: - box 3's real label can only be O or A - box 3's current label is A+O - since ALL LABELS ARE INCORRECT then box 3's real label can not be A+O - box 3's new label should then be O by elimination - since ALL LABELS ARE INCORRECT - box 1's label is changed to A - box 2's label is changed to A+O - SOLVED 2) if you pick an Apple: - box 3's real label can only be O or A - box 3's current label is A+O - since ALL LABELS ARE INCORRECT then box 3's real label can not be A+O - box 3's new label should then be A by elimination (not O) - since ALL LABELS ARE INCORRECT - box 1's label is changed to A+O - box 2's label is changed to O - SOLVED it only says you can't look, doesn't mean you can't feel around or smell the fruit you picked, easy deduction after you figure the first box out Sagmi is right, but did not give the full reasoning. "the bax lebeled Apples+Oranges contains only Oranges or Only Apples. Pick one fruit from it. If it is Orange then lebel the box as Orange." so far so good Now, the box labelled Apples cannot be the box containing only Oranges, you've just found that box, so it must contain Apples and Oranges. And in that case the other box, labelled Oranges, must contain only Apples. It's easier to draw it out. There are only 2 possible combinations when all labels are tagged incorrectly. All you need to do is pick one fruit from the one marked "Apples + Oranges". If it's Apple, then change "Apple + Orange" to "Apple" The "Apple" one change to "Orange" The "Orange one change to "Apple + Orange" If it's Orange, then change "Apple + Orange" to "Orange" The "Apple" one change to "Apple + Orange" The "Orange" one change to ""Apple" Since all 3 boxes are labled incorectly Start with the box Labled A&O. If Its apples than the box labled apples then the apple one is oranges and the oranges is O&A. Label each box "Apples and/or Oranges" and the all will be correct. This is very simple to resolve. I was asked the same question at FileMaker. Each box is incorrectly labeled. So you go to the box that is labeled "Oranges and Apples" and take one out. It doesn't matter what comes out because all that you know is that it is not AO. If you remove an Apple then move the Apple label to it. Since the Apples are already identified it is easy to resolve the rest. All you know for certain is that the other two boxes remaining are mislabeled. So the AO label goes on the box with the remaining label and that label goes on the Apple box as you have already assigned that. The end result is you only need to remove one piece of fruit to figure out the proper locations of all. Go down the road to HP. Maybe they are hiring. Some of these pseudo-problem solving questions like this are bunk. I was once asked why sewer covers are round and not square. I gave the correct answer without even hesitation and the interviewer seemed put off that I knew the answer. I didn't get the job but, in hindsight, no great loss. I prefer the questions (like the basketballs one from google) where you won't be able to give an accurate numerical answer but by explaining HOW you would go about solving the problem is all you need to do and MAYBE shows your aptitude for problem solving. Smell the box you opened. Step 1: Order the boxes by weight. Either apples weigh more than oranges, or oranges weigh more than apples. The mixed box will always be in the middle. Step 2: Open the first box, take out the fruit and look at it. Step 3: If the fruit is an apple, deduce that the middle is apple and oranges and that the third box is oranges. If the fruit is an orange, then deduce that the last is the box with the apples. Show More Responses Donna is the only one with any common sense. The problem with corporate America, is that it's run by a bunch of Bozos who over complicate things and have a narrow to zero vision on how to solve even the simplest problems. I can imagine that most of you would get a committee, have long meetings where you talk about 'think out of the box', and 'at the end of the day' nonsense. This is an interesting logic question, but I would not want to buy fruit from a company who knew they had a problem and then sampled one out of three boxes to resolve the issue. There are other correct answers posted. I'll just make a comment: "The boxes have been incorrectly labeled such that no label identifies the actual contents of the box it labels." Nothing in the above statement says the labels are limited to oranges/pears, only that they do not identify the contents. They could say 'nuts', 'bolts', etc. Technically, all answers should be prefaced with: assume that the labels say 'oranges', 'pears', and 'orange/pears'. Ok, the problem does not make sense and is unsolvable if the labels say 'x', 'y', 'z', but someone with (likely with a math proof back ground) may appreciate attention to detail. Q: Why do posters denigrate the interview questions? The questions, however stupid they may be, are a opportunity to show you can build an answer. Even if you pursue an invalid train of thought in the interview, it's a thought. It's what they want to see and what will help you get a job offer. Note: I also would not assume that the questions asked are a reflection on the company, department, or team as a whole. It may just be the interviewer that has chosen poorly. So to say "I don't want to work for company X because they asked me a stupid interview question" is pretty closed minded. To even think I don't want to work with that interviewer just based on questions asked seems extreme. rightly pointed out by Sagmi ... this question was put forward to me at Huawei Technologies and that was the answer I gave So the question was asked at an interview for Apple: Label ALL the boxes apple and charge a ridiculous price for them! Just label all of them "Fruit." Put another way, it is not possible to tell since we don't know how the boxes are mis-labled. What if the Apple box was labeled Oranges and both the other boxes were labeled Apples and no box was labled Apples and Oranges? You might have assumed there are three different labels when their might have only been two different labels. Always pict a piece of fruit from the box labelled Apple&Orange. As we know that this label is wrong, there are two possibilities: If it is apple, then wo know that this box should be labelled Apple, so we switch Apple label with the label Apple&Orange. Then Apple label is correct. We also know that the Orange label is incorrect, so we then switch Orange label and Apple&Orange label. if it is orange, then we know that this box should be labelled Orange, so we switch Orange label with label Apple&Orange. Then Orange label is correct. The same as above, we know that the Apple label is incorrect, so we switch Apple label and Apple&Orange label. If all boxes are labeled incorrectly and u pick a orange out of a box that's labeled apple/oranges change the name to oranges then change the box labeled oranges to apples and the the box labeled apples to apple and oranges... If you pick a apple out of a box labeled apples and oranges change the name to apples and then change the box labeled apples to oranges and the last to apples and oranges... If u pick a apple out of a box labeled oranges change it to apples and oranges then the box labeled oranges to apples and the box labeled apples to oranges...if you pic a orange out of a box labeled apples change it to apples and oranges and the box labeled oranges to apples and the last to apples and oranges... See the pattern? I think there is a big box and it contain two small boxes and all the labels are incorrect so big one contain two boxes that makes it carrys both orange and apples and in that thwo boxes having orange and apple respectively so if we open any box we can label it correctly Show More Responses if it known already that boxes labeled incorrectly, I would give it back to those who did label them and ask to fix this confusion. it is impossible to tell by opening only one box, so you have to open one more box. As mentioned already, if you start with the A+O bucket, you can solve the puzzle by pulling only one fruit, Bucket: A+O Found: A Bucket A+O > A | A+O, but since A+O label is incorrect, then it must be A Bucket O > since A is taken, the new label must be O | A+O, but since O is incorrect, it must be A+O Bucket A > since A and A+O are taken, it must be O Bucket: A+O Found: O Bucket A+O > O | A+O, but since A+O label is incorrect, then it must be O Bucket A > since O is taken, the new label must be A | A+O, but since A is incorrect it must be A+O Bucket O > since O and A+O are taken, it must be A If you are lucky, you might solve it with just one fruit even if you start with other buckets, Bucket: A Found: A Bucket: A > A | A+O, but since the A label is incorrect, it must be A+O Bucket: O > A | O, but since the O label is incorrect, it must be A Bucket: A+O > since A+O and A are taken, it must be O Bucket: O Found: O Bucket: O > O | A+O, but since the O label is incorrect, it must be A+O Bucket: A > A | O, but since the A label is incorrect, it must be O Bucket: A+O > since A+O and O are taken, it must be A If you start with the A bucket and pull an O or if you start with the O bucket and pull and A, then you are SOL and you need to pull out more fruits to figure it out. 1. Open one box and check its contents. 2. Remove the current label and apply the correct one (by removing it from one of the other boxes) 3. Since all boxes have been labeled incorrectly, switch labels between the other 2 boxes. And Voila you have all the boxes labelled correctly :) In requirement already specify that all three box labels are not correct. A+O A O Step1: First Pick an item A+O Box. If you get an Apple then it is a Apple Box. swap the label . A A+O O AS we already know in the box that label with Orange, does not contain Orange because of wrong label. So It must contain A+O. Just Swap the label A O A+O OK, all 3 boxes are incorrectly labeled. Open the one that says apples and oranges. Whatever is in there is what it is (since it cannot be apples AND oranges). Now, if there was an orange in there, apples must be in the orange box (since they cannot be in the apples box), and apples and oranges in the apples box (due to process of elimination). Get it? I guess questions like these will appear easy if you put them on paper, it is the possible combinations that become relevant, one way to approach is.. One of the key factor is all boxes are labelled incorrectly, this gives rise to only (2) combinations right To label for 1st box incorrectly you will have (2) options, once you label it then you have only choice to label the other two boxes incorrectly so 2 x 1 = 2 combinations possible i.e. Incorrect lablling options { Boxes_with_Oranges, Boxes_with_Apples, Boxes_with_Apples&Oranges } = { A, AO, O} or {AO, O, A} 2. To know for sure the contents of the boxes, you need to pick the box with either Apples or Oranges and avoid box with Apples and Oranges. So from the (2) combinations you could pick a fruit from Box_labeled AO (this will contain either Oranges or Apples) So, if you get a Orange, it means that combination is{AO, O, A} , so that means Box_with_Label_O has Apples, Box_with_Label_A has Apples and Oranges Box_with_label_AO has Oranges or else if you get a Apple that combination is {A, AO, O}. Box_with_Label_AO has Apples, Box_with_Label_O has Apples and Oranges Box_with_label_A has Oranges Then you can correctly label all the 3 boxes. First answer in this post is correct, as its said all boxes doesnt reflect correct items in it, If an apple is picked from a box , then it can be from either A/O box or A box, if the box is names A/O the, the label of the box has to be changed to A, then other two box labels to be accordingly. It is interesting that in 6 years people keep overthinking this. The answer is in the question and the criteria are that the boxes are immediately labeled and they are labeled correctly. ANSWER: FRUIT FYI you don't even need to open one box. Show More Responses Your choice going to be (( 2 apple 1 orange)) or (( 2orange 1apple )) . It can be recognize only one box (x) . U have to chose again until u get another formula then u will named easly . Step 1: Open a box labeled ‘Apples and Oranges’. We know that this box does not contain ‘Mixture’ for sure. If this fruit is an apple, then label this box as ‘Apple’. Step 2: (Very important) If we look at the box labeled as ‘Oranges’, we know that since the label is incorrect, this box either has only apples in it or has Mixture. Since we already know which box contains only apples, we know that the box labeled as ‘Oranges’ contains ‘Mixture’. So label it as ‘Mixture’. Step 3: (Very easy) The 3rd box will be labeled as ‘Oranges’. When you put your hands on the box to pick the fruits by touching every fruits you can feel whether all are apple or oranges or both and just pick one to see.So it is not necessary to pick one fruit and see whether it is orange or apple also it is not said in question that you can touch and feel all the fruits inside the boxes without taking it out .and then you can fix the label correctly on the boxes. Absurd, no logic km I will took a pen and stab the apple. and then ? apple-pen. Smelling the box and writing the correct label on each. :) Just label the boxes correctly. I got this question in a video interview. He verbally read out the question, but either left out the mislabeled part or I not heard it correctly. Without that piece of information, it was impossible to answer the question. Didn't get the job. Open box which is labeled apple+oranges. This box have the wrong label so it cannot have both. Now, -If you pick apple then it is having apples only -if you pick orange it contains orange change the label accordingly if the assumption is all 3 boxes are labeled wrongly; there is solution for sure; exhaust all possibles of combination A33 = 6 eliminate all wrongly labeled 4 possibilities; there are only 2 possibility left; just open the first box, you can tell which case is true among the left 2 cases. Show More Responses Think about you are taking the box1 A/O , you come to know that you are having Apple and orange combined box is box1,paste the label of A/O in the box1 and problem solved however the other two boxes have wrong label in it .... So the apple box will have orange label and orange box will have the apple label Take a fruit out of any box (let’s call this Box #1). Since, as the question states: “The boxes have been incorrectly labeled such that no label identifies the actual contents of the box it labels.”, you can remove the label from that box and put it aside. The label for the box the you took the fruit from has to come from one of the other two boxes that you did not take the fruit out of, but since you now know what is in Box #1, you can take the correct label from one of those two boxes (call this Box #2) and place it on the box that you picked the fruit from (which we have called Box #1). So now Box #1 is labeled correctly. Box #2 has no label (you took it and placed it on Box #1). The other box (call it Box #3), does not have the contents that the label says, so you can put it on Box #2 with full confidence that this is the correct label for that box. So now Box #2 is labeled correctly. The label that you put aside after taking it off Box #1 then can only go onto Box #3. So now Box #3 is labeled correctly. Only one box has mixed content and all boxes are incorrectly labeled (such that the box marked apples does not have only apples, the box marked oranges does not have only oranges, and the mixed box has either apples exclusively or oranges exclusively, but not mixed contents). Removing a fruit from either box labeled Apples or oranges can yield ambiguous results depending on if you get the mixed box or not (ie. if you pull an orange from the box labeled Apples, then you don't know if the contents are mixed or if they are exclusively oranges). Therefor, the fruit selection needs to come from the box labeled Mixed (Apples & Oranges). Which ever you select (Apple or Orange) will tell you that the contents of 'that' box is exclusively Apples or exclusively Oranges. Case #1, Mixed box has all Apples: In this case, there are 2 remaining boxes, the one marked "Apples" and the one marked "Oranges", since we know that the box labeled "Oranges" cannot contain oranges exclusively, and we now know that it doesn't contain apples exclusively either (those are in the Mixed box), the only remaining option for the box labeled "Oranges" is to contain the "Mixed (Apples & Oranges)", leaving the box containing all Oranges, exclusively, in the box labeled "Apples" Case #2, Mixed box has all Oranges: In this case, there are (still) 2 remaining boxes, the one marked "Apples" and the one marked "Oranges", since we know that the box labeled "Apples" cannot contain apples exclusively, and we now know that it doesn't contain oranges exclusively either (those are in the Mixed box), the only remaining option for the box labeled "Apples" is to contain the "Mixed (Apples & Oranges)", leaving the box containing all Apples, exclusively, in the box labeled "Oranges" as mentioned all boxes are labelled incorrectly. step 1 :Go for box mixed fruits....you will either get apple /orange there n never mixed becoz its labelled incorrectly.suppose you get apple in that box .....change the lable of mixed fruit to apple step 2: As all boxes are labelled wrongly .....interchange the rest boxes lable .... that is orange labled box to One or more comments have been removed. |
QA Automation Engineer at BitTorrent was asked...
A dwarf-killing giant lines up 10 dwarfs from shortest to tallest. Each dwarf can see all the shortest dwarfs in front of him, but cannot see the dwarfs behind himself. The giant randomly puts a white or black hat on each dwarf. No dwarf can see their own hat. The giant tells all the dwarfs that he will ask each dwarf, starting with the tallest, for the color of his hat. If the dwarf answers incorrectly, the giant will kill the dwarf. Each dwarf can hear the previous answers, but cannot hear when a dwarf is killed. What strategy should be used to kill the fewest dwarfs, and what is the minimum number of dwarfs that can be saved with this strategy? 21 AnswersThere are 2 different strategies, each dependent on whether there are an even or odd number of white and black hats in play. The minimum number of dwarfs that can be saved with the correct strategy is 9. There is only one strategy, does not matter how many white or black hats they are. They are always 9 dwarfs that could be saved. You just have to know about XOR. Well... In my opinion all can be saved! The tallest dwarf can see 9 hats in front of him ( 4 white and 5 black hats or the other way around). Then he knows the color of his hat because there has to be 5black and 5 white hats. The next dwarf by the size just has to believe to the tallest dwarf that he is right-(and he is) In addition ,he can see 8 hats in front of him and when he adds the color of the tallest dwarf he knows which color he has. Again,the 3rd one in a row knows about 2 colors before and can see 7 colors in front of him.And when he adds 2 colors he already had heard of -he knows total number of 9 hats as well.So he just has to see which color is less presented and that is the color of his hat. And so on until the last dwarf...All saved Show More Responses the question does not mention that there will be equal number of white and black hats ! Since they do not know, how many black or white hats there are, the following strategy will save min 5 dwarfs: The first dwarf asked names the color of the hat of the 2. dwarf. He has a 50% chance that that's correct. Anyway, the second dwarf then knows, the color of his hat and names it correctly. the 3. dwarf again names the color of the hat of the 4th dwarf and has a 50% chance to survive, while the 4th dwarf can name the correct color of his hat. a.s.o. => all dwarfs with an even number will survive and all the others have a 50% chance Don't over-think it. Each dwarf simply has to state the color of the hat worn by the dwarf directly in front of him. The tallest would have to sacrifice himself in order to save the other 9. Easy. The tallest is the only one that cannot be saved so instead of trying to guess his color, he yells out a sequence of letters starting from the shortest like BWBBBWWBB. Next :) Your going to definitly get 9 because when the dwarves collude the tallest tells the next tallest his hat color and so on down the line. Now you have a 50/50 chance that the tallest will get his color correct and live so you have 9 with a 50% chance of 10 Each dwarf can state the color of the hat worn by the dwarf in front of him, but the thing is, that color may not be the color of his own hat.So he may be killed by the giant.In that case, as mentioned above all odds should tell the color of next so that all even number will be alive and they have 50% chance of surviving. Think broadband communication. Exploit the capabilities of the communications medium. A minimum of nine dwarves can be saved based on the information provided in the original post I viewed. The strategy is for each dwarf to employ the expected language to communicate the color of their own hat to the giant, while simultaneously employing a vocal pitch protocol to indicate the color of the hat of the dwarf in front of him, high pitch for white and low pitch for black. The original post, indicates the dwarves may collude prior to the distribution of hats, so there is opportunity to negotiate such a simple broadband communication protocol. The tallest dwarf only has a 50/50 chance since the number of black and white hats in play is not known (rhetorical question, what are the odds the tallest dwarf's hat is black if he turns to find that all nine hats in front of him are white? I don't know, but odds are high that the giant is a sadistic bloke). The original post I viewed is here. http://www.businessinsider.com/toughest-job-interview-questions-2013-7#a-dwarf-killing-giant-lines-up-10-dwarfs-from-shortest-to-tallest-each-dwarf-can-see-all-the-shortest-dwarfs-in-front-of-him-but-cannot-see-the-dwarfs-behind-himself-the-giant-randomly-puts-a-white-or-black-hat-on-each-dwarf-no-dwarf-can-see-their-own-hat-the-giant-tells-all-the-dwarfs-that-he-will-ask-each-dwarf-starting-with-the-tallest-for-the-color-of-his-hat-if-the-dwarf-answers-incorrectly-the-giant-will-kill-the-dwarf-each-dwarf-can-hear-the-previous-answers-but-cannot-hear-when-a-dwarf-is-killed-the-dwarves-are-given-an-opportunity-to-collude-before-the-hats-are-distributed-what-strategy-should-be-used-to-kill-the-fewest-dwarfs-and-what-is-the-minimum-number-of-dwarfs-that-can-be-saved-with-this-strategy-11 So reading the answers provided they all have some assumptions e.g. that there are as much white hats as there are black hats. I think that Christian's comment on aug 13-2013 was very close but I'm thinking about communication integrity confirmation techniques. One of them is using a parity bit to confirm the message was correct. This could be applied right here to save at least 9 with a 50/50 chance of saving the 10th (and tallest dwarf). I will explain it but for ease of explanation I will use binary 1 and 0 for black and white. Number 1 being black hat and number 0 being white hat. Let's say we got a (random) hat sequence of 0001011101 with the tallest dwarf on the right and the shortest on the left. While colluding prior to the distribution of hats the dwarfs agree upon even or uneven parity. This means the total amount of 1's (black hats) must be even or uneven including the parity bit. In this case the 10th dwarf will count as parity bit. So if we'll take an even parity, the number of 1's must be an even number in total. When the questioning starts the tallest dwarf will see the hats in front of him being 000101110. The tallest dwarf counts four 1's (black hats) so to make the parity even he has to say 0 (white hat). He will get killed but the dwarfs in front of him will know the parity bit is 0 so the 2nd tallest dwarf will see the hats in front of him as 00010111. He will also count 4 and knowing that the dwarf behind him said 0 he'll know that the total amount of 1's is an even number thus concluding he has a 0 (white hat) and will state he has a white hat. Same goes for the rest of the dwarfs and so 9 will be saved. The 10th would've been saved it the dwarfs agreed on an uneven parity. That's why there's a 50/50 chance the 10th will be saved. I'm pretty confident this is the answer but if you want to understand it better (maybe my explanation is a bit vague) go search for "parity bit" on the internet. @Kristen - you have so underthought it! What if the dwarf behind you says "black" and the dwarf in front of you has a white hat???? @JustJanek- Your solution is close, but not correct. Every dwarf needs to consider the parity of a number composed of all the following dwarfs and all the dwarfs behind. The first dwarf says the parity of the 9-bits number in front of him. Assuming that all the other dwarfs know the trick and they stay alive, each dwarf needs to compare the initial parity with the parity of an 8-bit number composed of the hats in front of him and the hats behind (assuming that the dwarfs behind gave the right answer), if the parity is the same, he knows that he has a white hat, otherwise he has a black hat. Show More Responses You can save 9 dwarves at least. Dwarves agree that the tallest one says he is wearing black hat if he sees odd number of black hats in front of him and he says white hat if he sees even number of black hats in front of him. So, the tallest one has 50-50 chance of survival and other dwarves survive 100%. What is the minimum number of dwarfs that can be saved with this strategy? 9 First of all, let's numerate the dwarfs as N1, N2, N3, etc. with N10 being the tallest. Now, N10 will state the color of N9 as his own answer, "My hat is WHITE". Based on this answer, N9 will state his color with a positive statement if the color of N8 is the same as his, "My hat is WHITE". Based on N8's answer, N8 knows that his color is WHITE, now, he will state his color depending on N7. Let's say N7 is black, so N8 will state, "My hat is NOT BLACK". N7 knows that his color is BLACK, but N6 is white, so he will use a negative statement, "My hat is NOT WHITE" and so on. Full example: N10 = BLACK N9 = WHITE N8 = WHITE N7 = BLACK N6 = WHITE N5 = WHITE N4 = WHITE N3 = BLACK N2 = BLACK N1 = WHITE N10: My hat is WHITE (Dies) N9 = My hat is WHITE N8 = My hat is NOT BLACK N7 = My hat is NOT WHITE N6 = My hat is WHITE N5 = My hat is WHITE N4 = My hat is NOT BLACK N3 = My hat is BLACK N2 = My hat is NOT WHITE N1 = My hat is WHITE N10 will have a 50/50 chances of survival... I'm sorry N10, I couldn't save you :'( What is the minimum number of dwarfs that can be saved with my strategy? - 10 My strategy doesn't make any unmentioned assumptions (such as equal number of white and black hats, etc). At the same time, it doesn't add any unmentioned constraints either. The strategy is simple to the point of appearing simplistic. But it meets all the requires. The strategy is: When asked, every dwarf answers "Not RED". This is not an incorrect answer and the Giant, if he were an honourable giant that is :), would have to let the Dwarf live. On a different page altogether, I went through all of the above answers. Not to sound patronizing, but some of the solutions were quite brilliant. I was thinking if I could even come up with that even after years of pondering. But I must admit, all of the above strategies are made by an outsider (ie. us) who is not impacted by this fate. Whereas in the casestudy, the strategy has to be devised by the 10 dwarfs, who face the impact of this strategy. Not to bring in factors such as emotion, the bell curve distribution of intelligence, and other such anal considerations. But I thought it was important to bring in Game Theory, and that all Dwarfs are rational, and that all rational people do not want to harm themselves in any way. In other words, when a strategy's success depends on the conformance to that strategy by ALL the participants, the strategy should also benefit ALL the participants if it is to succeed (or in the least, should not harm even ONE participant). In all the above strategies, since even in the best case scenario the poor Tallest Dwarf has only a 50% chance of living, can we assume that he would conform to this strategy? Each dwarf should pronounce color of hat of dwarf before him. This way they can save atleast 9 dwarf out 10. Well, Once the dwarfs are lined up in descending order. Without any kind of assumption, 9 people can be saved with a 50% probability of the 10th (tallest). Here is how it can be achieved, The strategy is to call the color of odd number of hat. Say for example, the tallest dwarf sees 3 Black and 6 whites, it will call out Black(it may or may not die with 50% chances). Now, the 9th tallest dwarf knows what the 10th dwarf could see and if it (9th) dwarf sees the same odd number of black hats, it will know it has white hat. Next, 8th dwarf knows number of odd (black) caps 9th dwarf could see and if it(8th) finds 1 less black cap, it would know it is wearing a black cap.. and so on. 10- White (calls out Black because it sees odd number of black hats) -dies(assume) 9- White (calls out White because it could still see 3 black hars) 8- Black (sees that there is one less black hat as mentioned by 9th, hence identifies that is wearing black) 7-White (calculates that 8th is wearing black and he could see 2 black, hence identifies itself wearing whiteO( 6-White 5-White 4- Black 3-Black 2-White 1-White Sorry if there is confusion in the way I have answered. all can b saved... They will exchange their hats in Circular form...person10 can see the person1 color of hat and after exchange every dwarf will tell color to their previous ones and person 10 knows the color before changing it from dwarf 1. d10->d9->d8->d7->d6->d5->d4->d3->d2->d1->d10 CIRCULAR EXCHANGE OF HATS First lets look at number of back and white hats...To satisfy the condition "black and white" hata there is minimum one black or white hat present. So its minimum (9 black & 1 white) or (1 white & 9 black) hat being distributed randomly amoung dwarfs. The story says dwarfs are alowed to speak before execution. Lets make a strategy of saying only one colour before execution eg) black or white. Minimum probability of (9 black & 1 white) hats and all the dwarfs say "white"...In this case one is saved but all nine dead. If all dwarfs say "black"..Nine are saved but one is dead. The same applies for the minimum probability of (1 black and 9 white)hats. Thus minimum one dwarf is saved and maximum nine dwarfs can be saved. If each dwarf say the colour of hat in front of him..(dwarf can hear previous answer) then at least five people are saved. |
Senior QA Engineer at Clearleap was asked...
Draw a bridge and you have three people trying to cross? Seriously> 12 AnswersSeriously? This isnt a baby saving question for QA and a video company....They need that special feeling? Just in case? 4 people actually (you missed the requirement). Looks like you did not pay attention during the interview. These types of questions are designed to figure out your: a) Problem solving skills b) Creativity c) Ability to work under pressure And most of all to observe your thought process. But in your Senior QA Engineer role you should have know about that already, right? Who ever wrote the last response. Your obviously the one who asked the interviewer these questions. Those questions aren't a true interviewer tactic to figure out critical thinking. Get over yourself. Thanks to the person who posted this, after reading the last comment and the unecessary attack, you can just tell this company isnt worth interviewing with. Show More Responses Guess they're thinking they are Google? Bravo with the hasty comeback 2nd responder. I actually submitted my resume to your company. Will now look else where. People are entitled to their opinions and that reply lacks maturity and professionalism. My name is Slava Maksymyuk. I’m the QA Manager at Clearleap. It came to my attention that a certain interview question has been discussed here. I’m usually the one who asks problem solving riddles at the end of the interview process. These questions help to evaluate the approach candidates use to think out and solve the problem regardless of the answer. I know for a fact that similar interview riddles are used by various departments at large tech companies such as Netflix, Microsoft, and Amazon and yield successful results. We always look for ways to improve our interview process. Therefore, I’d like to ask the author to provide a more constructive view on why he/she thinks that such questions are problematic. Hey Slava Maksymuck why dont you stop copying other companies interview process and create your own that will apply to your company and team. Also you must lack management skills and proper HR interview training, most the companies you mentioned provide these "tests", either one on one to spare the candidate uncomfortableness. Having people sit there and watch for their entertainment is pitiful. Its pretty sad that you and someone else had to attempt to attack the person who posted this interview feedback, as this is Glassdoor and its intention is for feedback and for others to gather more information about the companies they have and work for. Out of all th interview feedback back I have read your reply "I am the QA Manager" like all hail the QA Manager at this company!!!! Unfortunately, your response is quite immature and therefore I withdraw myself from this conversation. oh my gosh i was going to post here regarding my experience with interviewing at this company recently and I stumbled upon this interview review. My experience interviewing was quite uncomfortable as well. I also sensed that the manager was not in touch with the actual products his company promotes. The questions were not difficult to answer, but the manner he asked was confusing. Also reading his replies to this review, he just sounds like he would be a head knocker for sure. Wish I wouldve read this review before my interview. Thank you original reviewer for posting this. Manager you shouldn't attack people ot get defensive on Glassdoor makes you look bad very. Regardless of opinions you should always conduct in a professional manner your comments do not show this. Also you sound like a child on your last comment. The person you responded to said nothing immature or unprofessional. Shame. I had to add my comment in here as the attacks on the company is just absurd and filled with lies of one person who is trying to execute an unjustified personal vendetta. Did anybody else notice that all the anonymous replies as “interview candidate” sound like the same person wrote them? OP, MY ADVICE TO YOU - GET OVER IT. YOU ALREADY EMBARRASSED YOURSELF IN THIS THREAD WITH ADOLESCENT-LIKE COMMENTS AND ATTACKS THAT ARE COMING ONLY FROM YOU. JUST READ YOUR OWN COMMENTS. I HOPE SOMEBODY FROM YOUR NEW COMPANY READS THIS AND REALIZES WHO THEY ARE DEALING WITH BEFORE IT’S TOO LATE. You have some serious personal issues. I truly feel sorry for you. I actually had an interview with Clearleap yesterday and I can tell you that above comments are not true. Interview process was very professional. Problem solving questions were quite interesting and I enjoyed them! Not as bad as the original poster said I'm sure, but seeing people gang up on him is a bit disconcerting even if he was writing all those responses which I'm still not convinced of Why I'm not surprised with the QA Manager and his team's reply I've worked in Clearleap as QA Engineer and trust me, it's not worth. The so called, QA Manager is highly unprofessional and immature himself. He just knows how to copy interview questions from everyone else. The real fact is, if any interviewer would ask him the same question, even a basic QA question, he would hardly know a word to answer. Rather than copying Netflix, Microsoft, and Amazon interview questions, try demonstrating your abilities in these companies. Common dude, Who asks Severity vs Priority, What if developer does not accept the bug, kinda questions in a Sr. QA Engineer interview..? This explains their ability and level to interview people. Please mug up or copy some good QA questions, so you don't have to face these kinda reviews. |
Quality Assurance Engineer at Amazon was asked...
Write a function in any language that will print "AN" if a number is divisible by 8, "ANIM" if divisible by 16 and "ANIMAL" if divisible by 32. 11 AnswersI was not strong enough in Python to solve this problem on the spot. But after some study I believe the following would have been a suitable answer: def numberchecker(): print("Enter Number or Press q to quit:") i = input() if i == "q": print("Good bye!") else: try: n = int(i) if i == "q": print("Good bye!") elif n % 32 == 0: print("ANIMAL") numberchecker() elif n % 16 == 0: print("ANIM") numberchecker() elif n % 8 == 0: print("AN") numberchecker() else: print("Try a diffrent number next time.") numberchecker() except ValueError: print("Entry is unacceptable.") numberchecker() numberchecker() import java.util.*; import java.util.Scanner; public class Main { public static void main (String[]args) { int num ; Scanner a = new Scanner(System.in); num = a.nextInt(); System.out.println("enter num " +num); if(num%8==0) { System.out.print("AN"); } if(num%16==0) { System.out.print("IM"); } if(num%32==0) { System.out.print("AL"); } } } Good work. I checked your code and it runs. This is a variation on the classic FizzBuzz coding question. One suggestion: You can simplify your code by printing the user prompt in the input function. # i = input("Enter a number or press Q to quit:") Another suggestion: Make the letter "q" case insensitive by passing the ".lower()" method after your input string # i = input("Enter a number or press Q to quit:").lower() One thing: You don't need the following if clause which I've commented out. This condition is already checked and handled outside of the try block. """ try: n = int(i) # if i == "q": # print("Goodbye!") """ Show More Responses Use string builder to improve the run time. public static String printAnimal(int num) { if (num >= 8 && num = 16 && num = 16 && num < 32) { if (num % 32 == 0) { return "ANIMAL"; } } return "Number Not Divisible by 8"; } Simple one to solve in Python Coding def number_divisible(num): if num %32 ==0: print("ANIMAL") elif num %16 ==0: print("ANIM") elif num % 8 ==0: print("AN") given_num = 8 number_divisible(given_num) I could add the exceptional handling also to this code, incase input is not an integer, I did not add the code though, but that one simple too to add. given below is the solution with user Input data user_data = int(input("Enter your Number :")) def number_divisible(user_data): try: num = int(user_data) print("Proceed") if num %32 ==0: print("ANIMAL") elif num %16 ==0: print("ANIM") elif num % 8 ==0: print("AN") else: print("This number is not divisible by 8 or 16 or 32") except: print("Please Enter valid Number") number_divisible(user_data) printStringBasedOnDivisibleNumber("AN", 8, 8); printStringBasedOnDivisibleNumber("ANIM", 16, 8); printStringBasedOnDivisibleNumber("ANIMAL", 32, 8); private static String printStringBasedOnDivisibleNumber(String inputString, int inputNumber, int inputDivisibleNumber) { String outputString = ""; if (inputNumber % inputDivisibleNumber == 0) { outputString = inputString; } else { outputString = "Input number - " + inputNumber + " is not divisble by " + inputDivisibleNumber; } return outputString; } function main(num) { (num%32 == 0) ? console.log('ANIMAL') : (num%16 == 0) ? console.log('ANIM') : (num%8 == 0) ? console.log('AN') : console.log ('Number not divisible by 8, 16, 32'); } import java.util.Scanner; public class PrintAnimal { // Write a function in any language that will print "AN" if a number is // divisible by 8, "ANIM" if divisible by 16 and "ANIMAL" if divisible by 32. public static void main(String[] args) { Scanner s = new Scanner(System.in); System.out.println("Please enter the number:"); int num = s.nextInt(); if (num != 0) { if (num % 8 == 0) { if (num % 16 == 0) { if (num % 32 == 0) { System.out.println("ANIMAL"); } else System.out.println("ANIM"); } else System.out.println("AN"); } } else { } System.out.println("Entered num not divisle by 8,16,32"); s.close(); } } for i in range (1,100): #print(i) if i%8==0 and i%16!=0 and i%32!=0: print("AN") print(i) elif i%32==0: print('ANIMAL') print(i) elif i%16==0 and i%32 !=0: print('ANIM') print(i) |
Quality Assurance Engineer at Amazon was asked...
From a given list of array (Not sorted) find the second largest value Find the prime numbers from the given list of array (1 -100) Test plan for Amazon login screen 12 AnswersThe second question is pretty simple, and it does relate back to test cases. Think of every number as a different state of a program, and proceed as follows: Create a new list to house all your prime numbers. Add 2, 3, 5, and 7 to it. Then, iterate through your list. If the number you're looking at can be taken to 0 with a modulus of 2, 3, 5, or 7, ignore it. If passes all those tests, add it to your list of primes. This will give you a list of all prime numbers between 0 and 100. The trick is that if you know the largest number in the list, you can find all prime numbers in the list just by knowing all prime numbers less than the square root of your largest number (in this case, sqrt(100) = 10 and we look at 2, 3, 5, and 7. If the list was up to 121, we'd look at 2, 3, 5, 7, and 11.) This both gets you your answer AND minimizes the runtime of your program. I don't have any fancy tricks for the first question, but given that sorting is often time-consuming I would go with something like this: 1: Iterate through the list. Use two variables, a "largest" and "second largest." These two should start at 1 and 0 respectively. 2: With every number N, compare the value of N to "largest" and "second largest." 3: If N is larger than "second largest" and smaller than "largest," replace "second largest" with N. 4: If N is bigger than both "largest" and "second largest," then make "second largest" the value of "largest" and make the value of "largest" equal to N. This is very much a "brute force" solution. It may not be the best, but like I said - I don't know any special tricks for this problem. x = [10,21,2,3,4,5,6,7,8,9,12,45,67,88,888,4,4,5,3,3,45,37,34,6,777] y = [0,0] for(i= 0 ;i y[0] ){ y[0]= x[i] } } for(i= 0 ;i y[1] && x[i] !== y[0]){ y[1]= x[i] } } console.log(y[1]) Show More Responses var foo = []; var bar = [] for (var i = 1; i <= 100; i++) { foo.push(i); } for (var i = 0; i < foo.length ; i++) { if(isPrime(foo[i])){ bar.push(foo[i]) } } function isPrime(n){ if(n<=1){ return false} if(n<=3){ return true} if(n === 5 || n === 7) { return true} if(n % 2 === 0 || n % 3 === 0 || n % 5 === 0 || n % 7 === 0) {return false} return true; } console.log(bar) From a given list of array (Not sorted) find the second largest value: Integer[] i = {20,40,60,30}; List list = new ArrayList(Arrays.asList(i)); System.out.println(list); Collections.sort(list, Collections.reverseOrder()); System.out.println(list); System.out.println(list.get(1)); def secondLargest(self, nums): first, second = None, None for i in range(0, len(nums)): if i > first: first, second = i, first elif first>i>second: second = i return i def primenumbers(self, nums): for i in range (1, 101): for j in range(2, i): if (i%j)==0: break else: print (i) very simple to find second largest number in unsorted array. 1. first use sort method to sort given array in ascending order 2. then print length-2 (as last element is at length-1) int[] arr = { 1, 45, 45, 765, 22, 456, 12, 7, 000, 9213, 234551, 65454331, 1213, 56534, 12321}; Arrays.sort(arr); System.out.println("Secound largest number int the array is = "+arr[arr.length-2]); what if you have 2 same highest number for example {1,2,3,4,5,8,8} arr[arr.length-2] this will still print the highest number and not the second highest number. import java.util.*; public class SecondLargest { // From a given list of array (Not sorted) find the second largest value public static void main(String[] args) { int arr[] = { 7, 4, 6, 3, 7, 5, 2 }; Set unique = new HashSet(); for (int i = 0; i sortedList = new ArrayList(unique); Collections.sort(sortedList); System.out.println("Secord largest number : " + sortedList.get(sortedList.size() - 2)); } } from random import randint a=[] for i in range (1,10): a.append(randint(0,100)) a.sort() print(a[-2]) for i in range(len(a)): if a[i]%2!=0 and a[i]%3!=0 and a[i]%5!=0: print(a[i]," is a prime number") else: print(a[i]," is not a prime number") One or more comments have been removed. |
See Interview Questions for Similar Jobs
- QA Engineer
- Software Engineer
- Software QA Engineer
- Automation Engineer
- Senior Software Engineer
- Quality Assurance Engineer
- QA Analyst
- Senior QA Engineer
- Test Automation Engineer
- Software Developer
- Test Engineer
- Quality Assurance Analyst
- Software Test Engineer
- Senior QA Automation Engineer
- Software Quality Assurance Engineer
- Software Engineer In Test
- QA Tester
- Business Analyst
- Intern