Qualcomm Interview Question
Software Engineer / DevelopersCountry: United States
Interview Type: In-Person
Common sense is not so common..!!
That smart guy is able to recognize it because, none of them have a marker, only the person who was passing by was having marker..!!
As simple it is..!! :)
The smart one erases his forehead, presuming that there might be something on his forehead too. Then others being toooo dumb, stop looking and at and laughing. Now they just laugh at each other. Then the smart one knows that he too had a smiley on his forehead
principle of induction? really??? how is that even possible when only one realizes it !! think
one of the possibility could be he can look into his face in once of his eyes as a reflection.
apart from the smart person there are two other ppl. First among them laughs at both of the others. So the smart person is able to see that the first guy is laughing at second person with a smiley and at him also. He is able the smiley on the second guy s face. So ne concludes thers are smiley on his face also
Let the smart person be p1,others are p2,p3
P2,p3 might have started laughing only after seeing p1.p1 might have started laughing only after seeing both p2 and p3 and also realises that he has also smily as the other two started laughing seeing him. Now p2 and p3 also look at each other.p2 thinks that p3 is laughing seeing p1 smily and p1 is laughing seeing p3 smily.similarly p3 also thinks.
Let the smart person be p1,others are p2,p3
P2,p3 might have started laughing only after seeing p1.p1 might have started laughing only after seeing both p2 and p3 and also realises that he has also smily as the other two started laughing seeing him. Now p2 and p3 also look at each other.p2 thinks that p3 is laughing seeing p1 smily and p1 is laughing seeing p3 smily.similarly p3 also thinks.
****draws a smiley face on the forehead of all three and leaves***
the 4th person draws not only on the forehead of all 3 but also the 'leaves'(plural of leaf) of the tree!!!! n the smart one notices the leaves...may b daz d ans wen we think out of the box..:-)
lets take p1, p2 & p3 as 3 persons. Suppose p2 is the one who realizes that he too had a smiley on his forehead. how? ->
if p2 doesn't have, then p1 would have easily realized that p3 is laughing at him and p3 would have easily realized that p1 is laughing at him. Since both did not realize that means p2 also has a smiley on his forehead.
Exploring possible causes and effects would help understand the problem;
Cause 1: If no one had any smiley on their forehead.
Effect 1: No noticeable change in behavior, they continue their journey.
Cause 2: If only 1 guy had a smiley on his forehead.
Effect 2: Remaining 2 guys would laugh at that 1 guy and that 1 guy would have no clue!
Cause 3: If 2 guys had smileys on their foreheads.
Effect 3: The guy without a smiley would smile looking at the other 2. However, the 2 with smileys would each smile looking at the other with smiley on forehead BUT frown looking at the guy without smiley (or any similar doubtful behavior but no way a smile as there is nothing to smile at), instead of all 3 "start smiling at each other checking out smiley faces" as described in the question.
Cause 4: If all 3 guys had a smiley on their forehead.
Effect 4: All 3 would start smiling looking at each other, checking out the smiley faces, and no one would be frowned upon suspiciously as there would be nobody without a smiley face.
Out of the above effects, effect-4 is clearly defined in the question, and the smart guy would be the one to notice that only cause-4 could have lead to that effect.
1. Reserve 3 bits for the count of payload bits, thus allowing numbers 0-7;
2. Use the rest of the 5 bits in the <char> to transfer the payload;
This solution enables transferring 5 different combinations in a single char,
as well as communicating the actual size of the payload.
If they decide to walk from San Jose to New Jersey, they are not very smart to begin with :)
- Anonymous October 25, 2011