Software engineers write programs to design and develop computer software. Interviews are highly technical, so come ready to work through coding problems and math brainteasers. The specific questions you are asked will depend on what type of programming position you are looking for. Try researching a specific software discipline such as web development, application development, or system development.
You have 8 balls. All are identical except one is slightly heavier. You have a balance. What is the minimum number of weighings required to find the heavier ball?
Min answer can be 2 if you get luck and pick 2 and weigh and see a diff. Else the general answer is =3. 1. div 4 and 4 and weigh, 2. take the heavier side, div in half, 2 and 2 and weigh, 3. take heavier side and weigh/compare the two.
2: Start by weighing 3 and 3. Leave 2 off to the side. There are 3 possible outcomes: Case 1: The balance indicates that the piles of 3 are of equal weight. In this case, we know that one of the two off to the side is the heavy one. Weigh them against each other to determine the heavy one. Total weighings: 2. Case 2: The left pile of 3 is heavier. We know that one of the three balls on the left side is the heavy one. Randomly select two of the balls and keep the third off to the side. If the two selected balls weigh the same, we know that the one on the side is the heavy one. Otherwise, the heavier of the two balls is the heavy one. Total number of weighings: 2. Case 3: Without loss of generality, look at the balance from the other side and refer to case 2. In all cases, we find the heavier ball in a maximum of 2 weighings.