Solved


Sample from random roulette
Given a list of values and their probabilities sample 10,000 values. Example: x = [1 2 3 4 5]; prob = [0.2 0.1 0.4 0.1 0.2] ...

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

10 months ago

Solved


Pentagonal dodecahedron
<<https://upload.wikimedia.org/wikipedia/commons/7/73/Dodecahedron.gif>> Pentagonal dodecahedron is a dodecahedron that is ...

10 months ago

Solved


Luhn's Algorithm
Luhn's Algorithm is used as a checksum for credit card numbers or similar identifiers. It can detect single-digit changes and sw...

10 months ago

Solved


How many complete pizzas (number 2)
x is a vector with numbers of pizza slices. A corresponding vector n indicates in how many slices the pizza slices of x were cut...

10 months ago

Solved


Portfolio diversification: choose your stocks !
we have the returns of 3 stocks for the last 4 years and we have to combine only 2 stocks that are less correlated. Example: st...

10 months ago

Solved


Sieve of Eratosthenes
Find the nth lucky prime number. <https://planetmath.org/luckyprime> can u find a way for large n?

10 months ago

Solved


XOR fibonacci
a & b are the first two terms in the xor fibonacci sequence. Find the nth term of that sequence. XOR fib sequence is that in ...

10 months ago

Solved


Easy Sequences 30: Nearly Pythagorean Triangles
A Nearly Pythagorean Triangle (abbreviated as "NPT'), is an integer-sided triangle whose square of the longest side, which we wi...

10 months ago

Solved


İmage Series 1 OR
Given two input first one is a number which is uint8, second one is image which is 8 bit gray scale image, the image has pixsels...

10 months ago

Solved


Calculate FFT
Calculate the fft manually, without using matlab's builtin function. No cheating allowed.

10 months ago

Solved


Return the sequence element III
This problem is related to <http://www.mathworks.com/matlabcentral/cody/problems/42832-segmented-number-sequence Problem 42832>....

10 months ago

Solved


Polygon division
Given the number of vertices (or sides), n, of a planar convex polygon, return the number of ways, w, in which you can divide th...

10 months ago

Solved


generate a matrix of Legendre polynomials
input = x - the degree of the polynomial output = matrix of Legendre polynomials

10 months ago

Solved


4 Digit Sequence Repetitions
Given a 4 digit integer, a sequence can be created such that the next digit in the sequence is the ones digit from the sum of th...

10 months ago

Solved


Kurosu checker
The game of Kurosu is simple. A square grid contains cells that can be filled with either a 'X' or an 'O', similarly to a tic-ta...

10 months ago

Solved


Top layer of a 3D pyramid
create a 3D pyramid(x,y,z) of ones(1) and zeros(0)...where pyramid part is denoted by one....nd find the top layer(x,y) of the p...

10 months ago

Solved


Check Digit - 01
The International Standard Book Number (ISBN) is a numeric commercial book identifier that is intended to be unique. It used ...

10 months ago

Solved


Where do the maximum number belongs within a 3-D matrix?
Suppose, you are given two variables a and b as inputs in 2-D format. Find out, where do the maximum number belongs (as output c...

10 months ago

Solved


Fibonacci Word
F1='0' F2='1' F3 is the catenation of the previous two. So, F3 = cat(F2,F1)='10'. similarly, F4 = cat(F3,F2)= '101' ...

10 months ago

Solved


Do they touch?
The center and radius of two circles are given. Determine whether they touch.

10 months ago

Solved


Decoder Ring
You are given a matrix of numbers, your objective is to use the decoder ring to find the hidden message. ex. encoded_messa...

10 months ago

Solved


Project Euler: Problem 14, Longest Collatz sequence
The following iterative sequence is defined for the set of positive integers: n → n/2 (n is even) n → 3n + 1 (n is odd) U...

10 months ago

Solved


Fifteen Parity Check
The Matlab function fifteen initializes the 4x4 array with randperm(16), which produces 50% unsolvable puzzles. A <https://en.wi...

10 months ago

Solved


Convert Decimal Number to Hex number (including non integer value)
Convert Decimal Number to Hex number (including non integer value) E.X. (2598.675) in decimal = A26.ACCC in hexa

10 months ago

Solved


Sub-sequence - 03
Given three sequences, find the length of the longest common subsequence. It is similar to the previous problem -- <https...

10 months ago

Solved


Sub-sequence - 02
Given two sequences, find the length of the longest common subsequence. a=[1,1,1,1,1,2,3,1,4] b=[2,3,0,0,9,5,4,1] longe...

10 months ago

Load more