Return unique values without sorting
If the input vector A is [42 1 1],
the output value B must be the unique values [42 1]
The values of B are in the same order a...
Specific Element Count
Given a vector _v_ and a element _e_, return the number of occurrences of _e_ in _v_.
Note: NaNs are equal and there may be n...
Find the nearest prime number
Happy 5th birthday, Cody! Since 5 is a prime number, let's have some fun looking for other prime numbers.
Given a positive in...
3 years ago
Solved
Split Even Number Into Two Primes
Given an even whole number n (> 2), return a 2-element vector of primes, p, such that p(1) + p(2) = n.
Fun note: technically it...