Spot the outlier
All points except for one lie on a line. Which one is the outlier?
Example:
You are given a list of x-y pairs in a column ...
2年以上 前
解決済み
Solitaire Cipher
Implement the <http://en.wikipedia.org/wiki/Solitaire_(cipher) solitaire cipher>.
Since this is from Wikipedia, I am capturin...
2年以上 前
解決済み
Make a run-length companion vector
Given a vector x, return a vector r that indicates the run length of any value in x. Each element in r shows how many times the ...
2年以上 前
解決済み
Implement simple rotation cypher
If given a letter from the set:
[abc...xyz]
and a shift, implement a shift cypher.
Example:
'abc'
with a shi...
How many trades represent all the profit?
Given a list of results from trades made:
[1 3 -4 2 -1 2 3]
We can add them up to see this series of trades made a profit ...
2年以上 前
解決済み
Flag largest magnitude swings as they occur
You have a phenomenon that produces strictly positive or negative results.
delta = [1 -3 4 2 -1 6 -2 -7];
Marching through thi...
2年以上 前
解決済み
How long is the longest prime diagonal?
Stanislaw Ulam once observed that if the counting numbers are arranged in a spiral, the prime numbers contained in it form a sur...
2年以上 前
解決済み
Find the biggest empty box
You are given a matrix that contains only ones and zeros. Think of the ones as columns in an otherwise empty floor plan. You wan...
2年以上 前
解決済み
Spot the First Occurrence of 5
This problem series invites you to solve two simple problems related to the integer NUMBER FIVE, in order to celebrate <https://...
2年以上 前
解決済み
Recaman Sequence - II
Take an arbitrary starting point as input and create Recaman Sequence. Then find the 1, return its index.
For example: if n =...
2年以上 前
解決済み
Recaman Sequence - I
Recaman Sequence (A005132 - <http://oeis.org/A005132 - OEIS Link>) is defined as follow;
seq(0) = 0;
for n > 0, seq(n) ...
2年以上 前
解決済み
Sums of Multiple Pairs of Triangular Numbers
This is a follow-up to <https://www.mathworks.com/matlabcentral/cody/problems/44289 Problem 44289> - Find two triangular numbers...
2年以上 前
解決済み
Van Eck's Sequence's nth member
Return the Van Eck's Sequence's nth member.
For detailed info : <http://oeis.org/A181391 OEIS link> and <https://www.theguard...
2年以上 前
解決済み
Write c^3 as sum of two squares a^2+b^2
write c^3 as sum of two squares a^2+b^2. a and b must be integer and greater than zero.
For example
5^3 = 2^2 + 11^2
5...