Solved


Find sum of negative elements in row.
Find sum of negative elements in row. Example x=[1 -5 3 4 -6 6 7 8 9 10] result = -11

4 years ago

Solved


Compare two strings.
Compare two strings, whether they are equal or not.

4 years ago

Solved


Friday or not
I love Friday. Please tell me whether the day is Friday. Dateformat is 'yyyy-mm-dd' or 'dd-mmm-yyyy' or 'mm/dd/yyyy'. Exa...

4 years ago

Solved


Let's make puddings !
We will make puddings with eggs, milk and sugar. To make one pudding, we need one egg, 140(cc) of milk, 15 (g) of sugar. Now W...

4 years ago

Solved


Square a Number
Given an input x, return y, which is equal to the square of x.

4 years ago

Solved


Determine given vector is even or odd
Find the numbers of the input vector is odd or even then replace even with 1 and odd with 0 Example x = [ 3 3 4 6 1] ...

4 years ago

Solved


Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

4 years ago

Solved


Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.

4 years ago

Solved


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

4 years ago

Solved


A shooting competition
In a shooting competition, the target is a square of side L containing a circle of radius R<=L/2. A player scores one point if h...

4 years ago

Solved


what's my tax amount this year ?
given an annual salary x and a tax rate i calculate the amount that you have to pay.Example x = 70000; i=.10 y_correc...

4 years ago

Solved


Recurring Cycle Length (Inspired by Project Euler Problem 26)
Preface: This problem is inspired by <http://projecteuler.net/problem=26 Project Euler Problem 26> and uses text from that quest...

4 years ago

Solved


Project Euler: Problem 9, Pythagorean numbers
A Pythagorean triplet is a set of three natural numbers, a b c, for which, a^2 + b^2 = c^2 For example, 3^2 + 4^2 =...

4 years ago

Solved


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

4 years ago

Solved


Pi Estimate 2
Estimate Pi as described in the following link: <http://www.people.virginia.edu/~teh1m/cody/Pi_estimation2.pdf>

4 years ago

Solved


Volume and area of a sphere
Input(r) - radius Output([v,s]) - volume and area

4 years ago

Solved


Spherical Volume
Calculate the volume of a sphere.

4 years ago

Solved


Add the even numbers
Add only the even numbers of x example: x = [1 2 3 4 5] the positive numbers are: 2 4, so their sum is 6

4 years ago

Solved


How to calculate the length of a triangle's side given two angles and one side
You are given a triangle with angles alpha, beta and gamma and sides a opposite alpha, b opposite beta and c opposite gamma. ...

4 years ago

Solved


Find the volume of cone
Find the volume of cone, when given radius(r) and height(h).

4 years ago

Solved


Maximum of ND-array
Find the maximum element of a N dimensional array. Example: A=[1 2 4 ; -20 4 10]; The maximum is 10.

4 years ago

Solved


Non trivial identities - reshape
Return x by reshaping it.

4 years ago

Solved


Convert decimal to binary and then generate the minimum binary it can with jumbling
input is 10 --> 1010 output should be 3 --> 0011 input 23 --> 10111 output should be 15 --> 01111

4 years ago

Solved


Find the diagonal of the square of side L
You are given a square of side length L, find D the length of its diagonal.

4 years ago

Solved


Create a constant offset.
Add a constant offset to an array. Example a = [1 3 5 9] offset = 2 y = [3 5 7 11]

4 years ago

Solved


find the maximum element of the matrix
for e.g x = [1 2; 3 4] y = 4

4 years ago

Solved


How to Concatenate two strings?
How to Concatenate two strings?

4 years ago

Solved


short or buy ? take the opportunity
you had already calculated a theoretical stock value, now you checked in bloomberg the quoted price of that stock and you have t...

4 years ago

Solved


currency converter
given a rate of exchange calculate the equivalent units of 100 USD

4 years ago

Solved


Angle between Two Vectors
The dot product relationship, a dot b = | a | | b | cos(theta), can be used to determine the acute angle between vector a and ve...

4 years ago

Load more