Solved


Get ranking of a combination
I have the numbers pulled without replacement from the set [1 2 3 4 5 6 7 8 9 10 11 12 13]; They are then ordered from least to ...

1 month ago

Solved


Lowest sum from a group of digits
Hi there. It's James's daughter here again, and my third grade math teacher is up to her old tricks. This time, she's giving u...

1 month ago

Solved


Determine the full width at half max
Determine the full width at half max of a curve. The full width at half maximum (FWHM) is a parameter which is used for desc...

1 month ago

Solved


Fun with permutations
There are factorial(N) permutations of the numbers from 1 to N. For each of these permutations, we can find the set of indexes j...

1 month ago

Solved


Easy Sequences 104: One-line Code Challenge - GCDs of Sum of Consecutive Cubes
For a natural number, n, the function CC(n) is defined as follows: In other words, CC(n) is the sum of cubes ...

1 month ago

Solved


Easy Sequences 105: One-line Code Challenge - IPv4 Address Validation
The Internet Protocol version 4 (IPv4) is the dominant protocol for routing devices over the internet. IPv4 addresses are usuall...

1 month ago

Solved


Undocumented MATLAB tricks No. 1 - Save a function-returned struct
Often we face the case when we want to save a function-returned struct to a mat file with each of its field as individual variab...

1 month ago

Solved


Spiral Out - 01
Create a spiral matrix ( clock-wise direction ) of size n. Try to do that without using the built-in function.

1 month ago

Solved


compare strings
Given 2 strings and 3 actions (Insert,delete,replace) on characters. Find the difference between two strings. Example: str...

1 month ago

Solved


Logic 5

1 month ago

Solved


Create a matrix that counts up diagonally
Given a single input _N_, create a _N_ x _N_ matrix that counts from 1 : _N_ ², (along up-right diagonals, starting with 1 in th...

1 month ago

Solved


Vector pop
Take |n| elements from the end of the vector |v| and return both the shorten vector |v| and the |n| elements in a separate vecto...

1 month ago

Solved


Sum of adjacent elements in a vector
Given a vector v, return a vector s containting the sum of every two adjacent elements in the vector. Every element s(i) cont...

1 month ago

Solved


Area-06
The length of the side of a square is given. Draw 4 quarter-circles inside the square from 4 corners with a radius equal to the...

1 month ago

Solved


Family Savings Analysis
Given the bank accounts of individuals defined by a list of tuples containing the last name, first name, and savings: accounts ...

1 month ago

Solved


Play Tic-Tac-Toe: Easy Bots
Interactive Tic-Tac-Toe game versus the test suite algorithms. The contest will be 50 games of Computer first and 50 games of...

1 month ago

Solved


Binary code for an analog signal
Digitization of a signal consists of 3 stages: sampling, quantization and encoding. Sampling convert the analogue signal into p...

1 month ago

Solved


Yoonir - 03
Find the area of a seven-pointed star inscribed in a circle of radius r.

1 month ago

Solved


Separate even from odd numbers in a vector - with a loop
*Using a loop*, rearrange a vector of integers such that the odd numbers appear at the beginning, and even numbers at the end. T...

1 month ago

Solved


Put m balls into n boxes (again)
According to Cody Problem 1516, if I put 3 balls into 2 boxes then 1 1 1 1 1 2 1 2 2 ...

1 month ago

Solved


Inhomogenous Depth Scale Interpolation
I recently came across a dataset for physical ocean parameters such as temperature and salinity that provided data in the form o...

1 month ago

Solved


Extract leading non-zero digit (★★★★★)
(Copy of Problem 47) Benford's Law states that the distribution of leading digits is not random. This is probably because man...

1 month ago

Solved


Number of even divisors of a given number
Given a Number n, return the number of its even divisors without listing them. example: n=14 ; EvenDivisors={2,14} ; y=2 ...

1 month ago

Solved


Young's modulus
Given a value of <http://en.wikipedia.org/wiki/Young_modulus Young's modulus> (Y) expressed on MegaPascal, convert it to the uni...

1 month ago

Solved


nanoseconds passed today
Calculate the amount of nanoseconds passed in the current day of a certain date string.

1 month ago

Solved


grazing cows
Here is a fun problem I encountered in high school. Two cows are grazing in an enclosed square-shaped field of side length s ...

1 month ago

Solved


Given the name from the legend, return the handle
Write a function that will return the handle to the desired object. The input for this function will be a string which represent...

1 month ago

Solved


Zigzag of square matrix
find zigzag of square matrix in one dimension array a=[1 2 3;4 5 6;7 8 9]; should return b= [1 2 4 7 5 3 6 8 9]

1 month ago

Solved


Order of things - 1
Let's assume you have a number of calculations to perform, that depend on each other. E.g. 'A' can be calculated, once the outco...

1 month ago

Solved


Steal, Share, or Catch
You, I, and a few other characters are going to play a game of *Steal, Share or Catch*. We are going to play it 10,000 times vs...

1 month ago

Load more