Solved


Convex Hull Capture
Imagine four points in uv that form a square. uv = [ ... 0,0; 0,2; 2,2; 2,0]; Now we have two more po...

2 years ago

Solved


Fill an array given a sum and array length values
Fill an array with random numbers so that their sum and array length will be equal to the given values as input. Function will ...

2 years ago

Solved


Assignment Problem
Given a matrix where row i corresponds to person i, and column j corresponds to task j and cell (i,j) corresponds to the time ta...

2 years ago

Solved


Convert float to base N
The matlab function dec2base converts a positive integer number to a specified base. Extend it so that it works with non intege...

2 years ago

Solved


Number construction III
Given a positive integer, n, return a, b and c, such that 1. n = a^1.5+b^2.5+c^3.5 2. a, b and c are all positive integers...

2 years ago

Solved


Number construction II
Given a positive integer, n, return a, b, c and d, such that 1. n = a*2^b+c*3^d 2. a, b, c and d are all positive integers...

2 years ago

Solved


Integer complexity
Given an array, n, of positive integers, return an array, c, of the same size, in which each element is the complexity of the co...

2 years ago

Solved


Number construction I
Given a positive integer, n, return a, b, c and d, such that 1. n = a*sqrt(b)+c*sqrt(d) 2. a, b, c and d are all positive ...

2 years ago

Solved


Find the gcm of n given values
Create a function that given n integer values greater than zero, finds the two numbers with the greatest common divisor and retu...

2 years ago

Solved


Convert integer to base26 using letters
Write a function that converts a decimal integer to base26 using the letters of the english alphabet, i.e. 0->'a', 1->'b', 2->'c...

2 years ago

Solved


Sum the Digits of a Number
Given an integer, sum the digits repeatedly until you end up with a single value less than 10. For example, if you add the di...

2 years ago

Solved


Number of digits in an integer
Specifies how many digits in a given integer. Example: in=100 ==> out=3

2 years ago

Solved


Test if two numbers have the same digits
Given two integers _x1_ and _x2_, return |true| if the numbers written with no leading zeros contain the same digits. That is, t...

2 years ago

Solved


Binary Inversion
Given the unsigned 8-bit integer x, return the number y which is the binary inversion of x. For example if x is 5, y should b...

2 years ago

Solved


Convert decimal to binary and then generate the minimum binary it can with jumbling
input is 10 --> 1010 output should be 3 --> 0011 input 23 --> 10111 output should be 15 --> 01111

2 years ago

Solved


Replace values out of an interval with the lower or upper values
For a vector or matrix X and an interval [n1,n2], the function replace every element of x inferior to n1 by n1, and every elemen...

2 years ago

Solved


Splitting Circle
Consider a circle which has been divided into three concentric circles as depicted in the figure below The ratio betwen the a...

2 years ago

Solved


S-T-R-E-T-C-H I-T O-U-T
You will be given a row of numbers (x), and a single number (n). Your job is to write a script that will stretch out the row of...

2 years ago

Solved


Check if a rotated array was originally sorted
Suppose a sorted array is rotated at some pivot unknown to you. For example, |[0 1 2 4 5 6 7]| might become |[5 6 7 0 1 2 4]|. ...

2 years ago

Solved


Find longest run
Write a function longest_run that takes as input an array of 0's and 1's and outputs the length and index of the longest consecu...

2 years ago

Solved


Look Up Mapping
Let the input is A = {[] [] [] [1] []}; B = {'A','B','C','D','E'}; Mapped Output = 'D';

2 years ago

Solved


Fermat's Last Theorem - Fermat's conjecture
Fermat's Last Theorem (sometimes called Fermat's conjecture, especially in older texts) states that no three positive integers a...

2 years ago

Solved


Champernowne Constant
The <http://en.wikipedia.org/wiki/Champernowne_constant Champernowne constant> is a real number whose digits in decimal represen...

2 years ago

Solved


P-smooth numbers
This Challenge is to find <https://en.wikipedia.org/wiki/Smooth_number P-smooth number> partial sets given P and a max series va...

2 years ago

Solved


Is it an Armstrong number?
An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. Fo...

2 years ago

Solved


Lychrel Number Test (Inspired by Project Euler Problem 55)
The task for this problem is to create a function that takes a number _n_ and tests if it might be a Lychrel number. This is, re...

2 years ago

Solved


Mersenne Primes
A Mersenne prime is a prime number of the form M = 2^p - 1, where p is another prime number. For example, 31 is a Mersenne prim...

2 years ago

Load more