Solved


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 ...

7 years ago

Solved


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 thr...

7 years ago

Solved


Given a window, how many subsets of a vector sum positive
Given a vector: [1 0 -1 3 2 -3 1] and a window of 2, A sliding window would find: 1 + 0 = 1 0 - 1 = -1 ...

7 years ago

Solved


Triangle sequence
A sequence of triangles is constructed in the following way: 1) the first triangle is Pythagoras' 3-4-5 triangle 2) the s...

7 years ago

Solved


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

7 years ago

Solved


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...

7 years ago

Solved


Project Euler: Problem 11, Largest product in a grid
What is the greatest product of _k_ adjacent numbers in the same direction (up, down, left, right, or diagonally) in a _n×n_ gri...

7 years ago

Solved


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

7 years ago

Solved


Sums of cubes and squares of sums
Given the positive integers 1:n, can you: 1. Compute twice the sum of the cubes of those numbers. 2. Subtract the square...

7 years ago

Solved


Project Euler: Problem 18, Maximum path sum I
By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bott...

7 years ago

Solved


Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

7 years ago