Risolto


Apply a function array to an array of numbers
It is required to apply a cell array of functions to a numerical array, where the functions accept only scalar inputs. Exampl...

4 mesi fa

Risolto


Function composition
Write a function that accepts two function handles f and g and returns the composition h. That is, h = (f o g)(x) = f(g(x)) ...

4 mesi fa

Risolto


Scrabble Scores - 3
This problem is part of a set of problems that successively develop a more sophisticated Scrabble scoring routine. The point dis...

5 mesi fa

Risolto


Is this is a Tic Tac Toe X Win?
For the game of Tic Tac Toe we will be storing the state of the game in a matrix M. For this game: We would store the state ...

5 mesi fa

Risolto


[Master Regular Expression] Goat Latin
You are given a string sentence that consist of words separated by spaces. Each word consists of lowercase and uppercase letters...

5 mesi fa

Risolto


[Master Regular Expression] Unique Email Addresses
Every valid email consists of a local name and a domain name, separated by the '@' sign. Besides lowercase letters, the email ma...

5 mesi fa

Risolto


[Master Regular Expression] Largest Substring Between Two Equal Character
Given a string s, return the length of the longest substring between two equal characters, excluding the two characters. If ther...

5 mesi fa

Risolto


[Master Regular Expression] Strong Password Checker II
A password is said to be strong if it satisfies all the following criteria: It has at least 8 characters. It contains at l...

5 mesi fa

Risolto


[Master Regular Expression] Vowel-Consonant Score
You are given a string s consisting of lowercase English letters, spaces, and digits. Let v be the number of vowels in s and c ...

5 mesi fa

Risolto


[Master Regular Expression] Keyboard Row
Given an array of strings words, return the words that can be typed using letters of the alphabet on only one row of American ke...

5 mesi fa

Risolto


longest common semi-substring
Finding longest common substring is a common problem in string processing. This problem is a variant of that. Two strings are g...

5 mesi fa

Risolto


Eliminate Polysyllabics: Long live short words!
Given a string s1, return s2 in which all the words with more than one syllable have been removed. To make things simple, we ...

5 mesi fa

Risolto


Probability of red tulips (at both ends of a row)
I planted tulip bulbs in a row on my flower bed. I thought that I had planted white tulips all. However, later, it turned out t...

5 mesi fa

Risolto


Sleeping Queens 1
My youngest daughter received a card game named Sleeping Queens for Christmas this year, and has been playing it nearly non-stop...

5 mesi fa

Risolto


Fractal: area and perimeter of Koch snowflake
Starting from an equilateral triangle with side 's', what is the area and perimeter of Koch snowflake at n'th recursive iteratio...

5 mesi fa

Risolto


Set a diagonal
Given a matrix M, row vector v of appropriate length, and diagonal index d (where 0 indicates the main diagonal and off-diagonal...

5 mesi fa

Risolto


Find nth maximum
Find nth maximum in a vector of integer numbers. Return NaN if no such number exists. x = [2 6 4 9 -10 3 1 5 -10]; So ...

5 mesi fa

Risolto


Count consecutive 0's in between values of 1
So you have some vector that contains 1's and 0's, and the goal is to return a vector that gives the number of 0's between each ...

5 mesi fa

Risolto


Calculate the Number of Sign Changes in a Row Vector (No Element Is Zero)
For a row vector: V=[7 1 2 -3] there is one sign change (from 2 to -3). So, the function you write must return N=1. F...

5 mesi fa

Risolto


Calculate a modified Levenshtein distance between two strings
Inspired by the Cody problem found here. The Levenshtein distance is a charater-based string metric used to measure the differe...

5 mesi fa

Risolto


Calculate the Hamming distance between two strings
Inspired by a similar Cody problem found <http://www.mathworks.com/matlabcentral/cody/problems/93-calculate-the-levenshtein-dist...

5 mesi fa

Risolto


Calculator spelling - Letters to Numbers
Using the numbers on a calculator, and rotating the display 180 degrees, many words can be spelled. In particular, the following...

5 mesi fa

Risolto


Legend of Zelda - Rupee Count (Item Purchase)
Building off of <https://www.mathworks.com/matlabcentral/cody/problems/3025-zelda-rupee-count Problem 3025>, suppose that an arr...

5 mesi fa

Risolto


Legend of Zelda - Rupee Count (Compact)
Building off of <https://www.mathworks.com/matlabcentral/cody/problems/3025-zelda-rupee-count Problem 3025>, suppose that Link's...

5 mesi fa

Risolto


Pi Digit Probability
Assume that the next digit of pi constant is determined by the historical digit distribution. What is the probability of next di...

5 mesi fa

Risolto


Pi Estimate 1
Estimate Pi as described in the following link: <http://www.people.virginia.edu/~teh1m/cody/Pi_estimation1.pdf>

5 mesi fa

Risolto


Given a square and a circle, please decide whether the square covers more area.
You know the side of a square and the diameter of a circle, please decide whether the square covers more area.

5 mesi fa

Risolto


Volume Pillar
Calculate the volume of a pillar with radius l and heigth ar.

5 mesi fa

Risolto


Convert radians to degrees
Given input in radians, output to degrees

5 mesi fa

Risolto


Approximation of Pi
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given number of...

5 mesi fa

Carica altro