Gelöst


Sums with Excluded Digits
Add all the integers from 1 to n in which the digit m does not appear. m will always be a single digit integer from 0 to 9. no...

fast 13 Jahre vor

Gelöst


Remove all the words that end with "ain"
Given the string s1, return the string s2 with the target characters removed. For example, given s1 = 'the main event' your ...

fast 13 Jahre vor

Gelöst


Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

fast 13 Jahre vor

Gelöst


Elastic Collision 001: 1-D
Elastic Collision of two particles. <http://en.wikipedia.org/wiki/Elastic_collision wiki Elastic Collision> Solve Conservat...

etwa 13 Jahre vor

Gelöst


first step for Huffman Coding (easy)
Given a string, you must sort the characters by occurrence (from lowest to highest). This step is necessary to generate a Huf...

etwa 13 Jahre vor

Gelöst


Two-output anonymous function?
Return a function handle that when applied to an input, it produces two outputs: the first is the same as the input, and the sec...

etwa 13 Jahre vor

Gelöst


Count up then down
Create a function that produces counting up from 0 up to n then down to 0 n=2 --> 0 1 2 1 0 n=3 --> ...

etwa 13 Jahre vor

Gelöst


Prime Time
All you need to do here is submit your solution a prime number of seconds after the top of the hour. Any hour at all... Easy, ...

etwa 13 Jahre vor

Gelöst


Love triangles
Given a vector of lengths [a b c], determines whether a triangle with non-zero area (in two-dimensional Euclidean space, smarty!...

etwa 13 Jahre vor

Gelöst


Simple Decoder Ring
The stereotypical _decoder ring_ is remembered as a cereal box prize from the 1950s. Kids learned about cryptography by startin...

etwa 13 Jahre vor

Gelöst


Replace multiples of 5 with NaN
It is required to replace all values in a vector that are multiples of 5 with NaN. Example: input: x = [1 2 5 12 10 7] ...

mehr als 13 Jahre vor

Gelöst


Return 'on' or 'off'
When the input is true, return 'on', otherwise, return 'off'.

mehr als 13 Jahre vor

Problem


Return 'on' or 'off'
When the input is true, return 'on', otherwise, return 'off'.

mehr als 13 Jahre vor | 2 | 507 Lösungsvorschläge

Gelöst


sum of non-primes
The sum of the non-primes below 10 is 1+4+6+8+9+10=38 Find the sum of all the non-primes below the input, N.

mehr als 13 Jahre vor

Gelöst


Colon operator of two vectors
You are given two vectors of equal length: VecStart, VecEnd Each vector contain a set of integers, where VecEnd(j)>=VecStar...

mehr als 13 Jahre vor

Gelöst


All capital?
Are all the letters in the input string capital letters? Examples: 'MNOP' -> 1 'MN0P' -> 0

mehr als 13 Jahre vor

Gelöst


Which doors are open?
There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut the...

mehr als 13 Jahre vor

Gelöst


Raise Matrix to Power
For a given square matrix x and scalar a, find x^a without using '^' or 'mpower'.

mehr als 13 Jahre vor

Gelöst


Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
If _p_ is the perimeter of a right angle triangle with integral length sides, { _a_, _b_, _c_ }, there are exactly three solutio...

mehr als 13 Jahre vor

Gelöst


I've got the power! (Inspired by Project Euler problem 29)
Consider all integer combinations of a^b and b^a for the integer values 2 ≤ a ≤ 4 and 2 ≤ b ≤ 5: 2^2=4, 2^3=8, 2^4=16,...

mehr als 13 Jahre vor

Gelöst


Find max
Find the maximum value of a given vector or matrix.

mehr als 13 Jahre vor

Problem


Create a random logical vector of N elements of which M are true.
Your task for tomorrow is to create a random binary (logical) vector of N elements of which M are true. For example: ran...

mehr als 13 Jahre vor | 1 | 103 Lösungsvorschläge

Problem


Create a random vector of integers with given sum
Your task today is to write a function that returns a vector of integer numbers, between, and including, 1 and m, of which the s...

mehr als 13 Jahre vor | 4 | 83 Lösungsvorschläge

Gelöst


surface of a spherical planet
you just discovered its circumference, that is the input.

mehr als 13 Jahre vor

Gelöst


Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.

mehr als 13 Jahre vor

Gelöst


Given an unsigned integer x, find the largest y by rearranging the bits in x
Given an unsigned integer x, find the largest y by rearranging the bits in x. Example: Input x = 10 Output y is 12 ...

mehr als 13 Jahre vor

Gelöst


Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

mehr als 13 Jahre vor

Gelöst


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

mehr als 13 Jahre vor

Gelöst


Make a 1 hot vector
Make a vector of length _N_ that consists of all zeros except at index _k_, where it has the value 1. Example: Input ...

mehr als 13 Jahre vor

Gelöst


Reverse Run-Length Encoder
Given a "counting sequence" vector x, construct the original sequence y. A counting sequence is formed by "counting" the entrie...

mehr als 13 Jahre vor

Mehr laden