Community Profile

photo

sunny d


Bharat Electronics Ltd

13 total contributions since 2014

Contact

sunny d's Badges

  • Creator
  • Solver

View details...

Contributions in
View by

Solved


radius of a spherical planet
you just measured its surface area, that is the input.

alrededor de 6 años ago

Solved


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

alrededor de 6 años ago

Problem


Determine if given number is perfect
A number is <http://en.wikipedia.org/wiki/Perfect_number perfect> if it is equal to the sum of its factors, excluding itself. ...

alrededor de 6 años ago | 0 | 43 solvers

Solved


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

alrededor de 6 años ago

Solved


Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

alrededor de 6 años ago

Solved


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

alrededor de 6 años ago

Solved


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

alrededor de 6 años ago

Solved


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

alrededor de 6 años ago

Solved


Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

alrededor de 6 años ago

Solved


Add two numbers
Given a and b, return the sum a+b in c.

alrededor de 6 años ago

Solved


Is my wife right?
Regardless of input, output the string 'yes'.

alrededor de 6 años ago

Solved


Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

alrededor de 6 años ago

Solved


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

alrededor de 6 años ago