Risolto

Split a string into chunks of specified length

Given a string and a vector of integers, break the string into chunks whose lengths are given by the elements of the vector. Ex...

11 mesi fa

Risolto

Convert a numerical matrix into a cell array of strings

Given a numerical matrix, output a *cell array of string*. For example: if input = 1:3 output is {'1','2','3'} whic...

11 mesi fa

Risolto

Mongean Shuffle : 2

Extension to <https://www.mathworks.com/matlabcentral/cody/problems/2479-mongean-shuffle problem 2479>: Determine the number...

11 mesi fa

Risolto

Mongean Shuffle

A Mongean shuffle of an n card deck starts with putting the initial deck on the left hand side. * The top card of the deck is...

11 mesi fa

Risolto

Poker Series 01: isStraightFlush

The Poker Series consists of many short, well defined functions that when combined will lead to complex behavior. Our goal is to...

11 mesi fa

Risolto

SET (the card game)

<http://www.setgame.com/set/index.html SET> is a card game in which players try to find valid 3-card sets from 12 cards on the t...

11 mesi fa

Risolto

Card Game

This is an overly simplified and highly modified version of card game Twenty-Nine. A deck of 100 unique cards (hypothetical) ...

11 mesi fa

Risolto

Are you in or are you out?

Given vertices specified by the vectors xv and yv, and a single point specified by the numbers X and Y, return "true" if the poi...

11 mesi fa

Risolto

Guess the number I'm thinking of (Part 2)

Have you tried the original "Guess the number I'm thinking of" (Problem 44630)? This problem is just like that, except that the...

11 mesi fa

Risolto

Guess the number I'm thinking of (Part 1)

In this game you are competing against two other people to guess the number that I'm thinking of. I randomly choose an integer ...

11 mesi fa

Risolto

Bit calculation

Give me the count of numbers from 1 to n having their last two bits as 0. For example function y = ret_count(4) y = x...

11 mesi fa

Risolto

Mysterious digits operation (easy)

What is this digit operation? 0 -> 0 1 -> 9 121 -> 9 44 -> 6 15 -> 5 1243 -> 7 ...

11 mesi fa

Risolto

Can we make a triangle?

Given three positive number, check whether a triangle can be made with these sides length or not. remember that in a triangle su...

11 mesi fa

Risolto

Find the sides of an isosceles triangle when given its area and height from its base to apex

Find the sides of an isosceles triangle when given its area and the height from its base to apex. For example, with A=12 and ...

11 mesi fa

Risolto

Height of a right-angled triangle

Given numbers a, b and c, find the height of the right angled triangle with sides a and b and hypotenuse c, for the base c. If a...

11 mesi fa

Risolto

Is the Point in a Triangle?

Check whether a point or multiple points is/are in a triangle with three corners Points = [x, y]; Triangle = [x1, y1; x...

11 mesi fa

Risolto

Right Triangle Side Lengths (Inspired by Project Euler Problem 39)

If _p_ is the perimeter of a right angle triangle with integral length sides, { _a_, _b_, _c_ }, there are exactly three solutio...

11 mesi fa

Risolto

Find my daddy long leg (No 's')

Given the ratio of the two legs (longer / shorter), and the hypotenuse length, find the value of the bigger leg.

11 mesi fa

Risolto

Is this triangle right-angled?

Given any three positive numbers a, b, c, return true if the triangle with sides a, b and c is right-angled. Otherwise, return f...

11 mesi fa

Risolto

Side of an equilateral triangle

If an equilateral triangle has area A, then what is the length of each of its sides, x? <<https://i.imgur.com/jlZDHhq.png>> ...

11 mesi fa

Risolto

Calculate the area of a triangle between three points

Calculate the area of a triangle between three points: P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) these three points are the vert...

11 mesi fa

Risolto

Lights Out 7 - 5x5, x moves

<https://en.wikipedia.org/wiki/Lights_Out_(game) Lights Out> is a logic game wherein all lights need to be turned off to complet...

11 mesi fa

Risolto

Lights Out 2 - 5x5, 4 moves

<https://en.wikipedia.org/wiki/Lights_Out_(game) Lights Out> is a logic game wherein all lights need to be turned off to complet...

11 mesi fa

Risolto

Lights Out 1 - 5x5, 3 moves

<https://en.wikipedia.org/wiki/Lights_Out_(game) Lights Out> is a logic game wherein all lights need to be turned off to complet...

11 mesi fa

Risolto

Find the next prime number

Find the next prime number or numbers for given n. For example: n = 1; out = 2; or n = [5 7]; out = [7 11]; ...

11 mesi fa

Risolto

Make a vector of prime numbers

Input(n) - length of vector with prime numbers Output(v) - vector of prime numbers Example: * n=1; v=2 * n=3; v=[2 3 5...

11 mesi fa

Risolto

Largest Twin Primes

<http://en.wikipedia.org/wiki/Twin_prime Twin primes> are primes p1, p2 = p1 + 2 such that both p1 and p2 are prime numbers. Giv...

11 mesi fa

Risolto

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

11 mesi fa

Risolto

Find nearest prime number less than input number

Find nearest prime number less than input number. For example: if the input number is 125, then the nearest prime number whi...

11 mesi fa

Risolto

Sophie Germain prime

In number theory, a prime number p is a *Sophie Germain prime* if 2p + 1 is also prime. For example, 23 is a Sophie Germain prim...

11 mesi fa