Find all non duplicate pairs that sum to S.
try to do it in O(nlogn).
Solution 1:
[Read more…]
You can write one number on each face of the dice from 0 to 9 and you have to represent days from 1 to 31, for example for 1, one dice should show 0 and another should show 1, similarly for 31 one dice should show 3 and another should show 1.
represent days of month using two dice
How?
Basically you have to show 11, 22 so 1 and 2 should be present in both dices, similarly to show 01, 09 0 should be present in both dices, now the trick is for showing 9 you can use dice with 6 printed on one of the face.
how many animals do you see
guess the movie names from the picture
triangle puzzle
Answer is 30.
How?
ignore 225, it is to confuse, here we will use the triangles property that the sum of all the angles inside a triangle should be 180 degree.
so 75 + 75 + ? = 180
=> ? = 180 – 150
=> ? = 30
IF 5 + 3 = 28
9 + 1 = 810
8 + 6 = 214
5 + 4 = 19
then 7 + 3 = ???
Answer is 410.
How?
5 + 3 = (5-3)(5+3) = 28
9 + 1 = (9-1)(9+1) = 810
8 + 6 = (8-6)(8+6) = 214
similarly
7 + 3 = (7-3)(7+3) = 410
IF
2 + 3 = 10
8 + 4 = 96
7 + 2 = 63
6 + 5 = 66
then 9 + 3 = ?
Answer is 108.
How?
2 + 3 = 2 *(2+3) = 10
8 + 4 = 8*(8+4) = 96
7 + 2 = 7*(7+2) = 63
6 + 5 = 6*(6+5) = 66
9 + 3 = 9*(9+3) = 108
IF
1 = 3
2 = 3
3 = 5
4 = 4
5 = 4
then 6 = ?
Answer is 3.
How?
It simple, but you have to think more then the math 🙂
1 = one = 3 letters
2 = two = 3 letters
3 = three = 5 letters
4 = four = 4 letters
5 = five = 4 letters
6 = six = 3 letters
64 5 40
81 7 65
16 4 ?
Answer is 16.
How?
Its a little trickier one then others.
sqr root(64) * 5 = 40
sqr root(81) * 7 = 63
sqr root(16) * 4 = ? = 16.
6 3 2
-3 ? 5
———-
2 6 7
Answer is 6.
How?
It is the simple subtraction as we used to do in our early maths classes in our childhood, so just reminds us of those days of taking carry and subtracting.