Solved


Max of a Vector
Write a function to return the max of a vector

6 months ago

Solved


Temperature Conversion 3
Given a temperature in Celcius, convert it to Fahrenheit.

6 months ago

Solved


Twins in a Window
<http://en.wikipedia.org/wiki/Twin_primes Twin primes> are prime numbers that differ by 2, such as [11,13] or [41,43]. Write a f...

6 months ago

Solved


Ratio between sum of primes and sum of factors
Write a function that calculates the ratio between the sum of primes numbers lower or equal to x, and the sum of the factors of ...

6 months ago

Solved


Frequencies of prime gaps
Problem statement Given two positive integers n and , write a function which computes the frequency of the gap between two ...

6 months ago

Solved


Check Legendre's conjecture
Context and problem statement Legendre's conjecture states for a given positive integer n, there always exists at least one pri...

6 months ago

Solved


The Answer to Life, the Universe, and Everything
A variation of a previous Hitchhiker's Guide to the Galaxy problem. *Inputs:* Life, the Universe, and Everything *Output:*...

6 months ago

Solved


Linear primes p' = mp + n
Problem statement List the prime numbers of the form p' = mp + n for a given (m,n) couple and such that p' < k, k positive in...

6 months ago

Problem


Linear primes p' = mp + n
Problem statement List the prime numbers of the form p' = mp + n for a given (m,n) couple and such that p' < k, k positive in...

6 months ago | 3 | 29 solvers

Solved


List the complementary / symetric prime couples
Problem statement For a given positive integer n, provide the prime couples (p,p') such that p + p' = 10^n. NB : a number li...

6 months ago

Problem


List the complementary / symetric prime couples
Problem statement For a given positive integer n, provide the prime couples (p,p') such that p + p' = 10^n. NB : a number li...

6 months ago | 3 | 31 solvers

Solved


Reverse the elements of an array
Reverse the order of elements in an array: eg: input X = [ 1 2 3 ; 4 5 6 ; 7 8 9 ] o...

6 months ago

Solved


Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector of numbers, output a square array with the...

6 months ago

Problem


Check Legendre's conjecture
Context and problem statement Legendre's conjecture states for a given positive integer n, there always exists at least one pri...

6 months ago | 2 | 36 solvers

Solved


List the twin prime couples
Problem statement The twin prime couples (p,p') are the ones such that p' = p + 2. For a given integer n > 1, list the twin p...

6 months ago

Problem


List the twin prime couples
Problem statement The twin prime couples (p,p') are the ones such that p' = p + 2. For a given integer n > 1, list the twin p...

6 months ago | 2 | 32 solvers

Solved


Check Bertrand-Chebyshev's theorem abour prime numbers
Historical context Bertrand's postulate, also later known as Chebyshev's theorem, is a very important theorem in number theory ...

6 months ago

Problem


Check Bertrand-Chebyshev's theorem about prime numbers
Historical context Bertrand's postulate, also later known as Chebyshev's theorem, is a very important theorem in number theory ...

6 months ago | 2 | 34 solvers

Solved


Draw 'I'
Given n as input, draw a n-by-n matrix 'I' using 0 and 1. example: n=3 ans= [0 1 0 0 1 0 0 1 0] n=...

6 months ago

Solved


Draw 'B'
Draw a x-by-x matrix 'B' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 0 1 0 0 0 1 ...

6 months ago

Solved


Draw 'D'.
Draw a x-by-x matrix 'D' using 0 and 1. example: x=4 ans= [1 1 1 0 1 0 0 1 1 0 0 1 1 1 1 0]

6 months ago

Solved


Draw 'C'.
Given x as input, generate a x-by-x matrix 'C' using 0 and 1. example: x=4 ans= [0 1 1 1 1 0 0 0 ...

6 months ago

Solved


Draw 'F'
Draw a x-by-x matrix 'F' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 1 1 0 0 0 0 ...

6 months ago

Solved


Draw 'E'
Draw a x-by-x matrix 'E' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 1 1 0 0 0 0 ...

6 months ago

Solved


Draw 'J'
Given n as input, generate a n-by-n matrix 'J' using 0 and 1 . Example: n=5 ans= [0 0 0 0 1 0 0 0 0 1 0 0 ...

6 months ago

Solved


Draw a 'N'!
Given n as input, generate a n-by-n matrix 'N' using 0 and 1 . Example: n=5 ans= [1 0 0 0 1 1 1 0 0 1 1 0 ...

6 months ago

Solved


Draw 'H'
Draw a x-by-x matrix 'H' using 1 and 0. (x is odd and bigger than 2) Example: x=5 ans= [1 0 0 0 1 1 0 0 0 1 ...

6 months ago

Solved


Draw a 'Z'.
Given _n_ as input, generate a n-by-n matrix like 'Z' by _0_ and _1_ . Example: n=5 ans= [1 1 1 1 1 0 0 0 1 ...

6 months ago

Solved


Draw a 'X'!
Given n as input Draw a 'X' in a n-by-n matrix. example: n=3 y=[1 0 1 0 1 0 1 0 1] n=4 y=[1 0 0...

6 months ago

Solved


Draw 'O' !
Given n as input, generate a n-by-n matrix 'O' using 0 and 1 . example: n=4 ans= [1 1 1 1 1 0 0 1 ...

6 months ago

Load more