See Answer
Answer is 1
Sum of all 4 outer box is 100
See AnswerHide Answer
Sum of all 4 outer box is 100
See AnswerHide Answer
How?
Multiply the two numbers and then multiply the result by 5.
See AnswerHide Answer
How?
Number in middle column is sum of the respective numbers in first and third column. thus the missing number should be 56 – 29 = 27.
Problem Statement:
Given an array a of n integers find all possible Pythagorean triplets from the array.
A Pythagorean triple consists of three positive integers a, b, and c, such that a2 + b2 = c2. this formula is derived from Pythagoras theorem: “For every right angle triangle with side lengths a, b, and c=> a2 + b2 = c2“.
Solution:
[Read more…]
How?
Its simple, just multiply the number by 3.
See AnswerHide Answer
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).
See AnswerHide Answer
How?
If you see the rows every next number = previous number in the row +3.
See AnswerHide Answer