
IF 1 = 3
2 = 6
3 = 9
4 = 12
Then, 5 = ?
Answer is 15
How?
Its simple, just multiply the number by 3.
IF 1 = 3
2 = 6
3 = 9
4 = 12
Then, 5 = ?
How?
Its simple, just multiply the number by 3.
IF 1+2 = 3
3 + 4 = 21
5 + 6 = 55
Then 4 + 5 = ?
Explanation:
1 + 2 => (1)^2 + (1*2) = 3
3 + 4 => (3)^2 + (3*4) = 21
5 + 6 => (5)^2 + (5*6) = 55
Thus 4 + 5 => (4)^2 + (4*5) = 36
Problem Statement:
Given a set S of n integers find all possible subsets(a,b,c) such that a + b + c = 0.
Solution:
Brute force approach is of O(n^4) but we can solve it in O(n^2) by using the approach in Non duplicate pairs that sum to S.
First sort the array(Order O(nlogn)), than finding a, b, c pairs is equal to finding=> For every element a in the array, if there exists a pair with sum equal to -a. As explained in Non duplicate pairs that sum to S, we can get the pair with sum -a in O(n) and we have to repeat this exercise n times so order of complexity will be O(n^2).
13, 25, ?
16, 28, 35
19, 31, 28
What is the missing number.
How?
If you see the rows every next number = previous number in the row +3.
Whats the missing number in the triangle
number puzzle 24
How?
Number on the bigger line is the multiplication of the numbers on the adjacent smaller lines, thus the answer should be 10*9=90.
Find the missing number
How?
Actually number on the right side is the square of the exact opposite number.
thus the missing number should be 6^2.
Find the missing number
How?
There is gap of 4 between numbers
8+4 = 12
3+4 = 7
9-5 = 4
simillarly
?-4 = 6=> ?=10
NOTE: there is a better and shorter explanation(suggested by Guestlogic in comment), opposite numbers sum is 15, that’s why answer should be 15 – 5 = 10
number puzzle 21