Problem Statement
Given an integer array of length N, containing values in the range 1,2,3…N^2. Sort the array in O(N) time.
Solution
[Read more…]
Problem Statement
Given an integer array of length N, containing values in the range 1,2,3…N^2. Sort the array in O(N) time.
Solution
[Read more…]
How?
Answer is in this format : <last digit><sum of all digits>
thus answer to this number puzzle will be 79.
See AnswerHide Answer
How?
Sum multiplied by 2.
See AnswerHide Answer
How?
72/18 = 4
95/19 = 5
missing number should be 84/14 = 6.
How?
Let say smallest square is of side 1cms then
Number of squares with side 1cms: 6
Number of squares with side 2cms: 8
Number of squares with side 3cms: 2
Number of squares with side 4cms: 1
See AnswerHide Answer
How?
number on the right side of the box is the multiple of the first digit on the left side and 3.
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…]