A résolu


Calculate the mean of each half of a matrix
Given a matrix with an even number of columns, n, return a 1-by-2 row vector where the first element is the mean of all the elem...

12 mois il y a

A résolu


Find Closest Constant
Given a number x, return the value that is closest to x from this list of constants: 0, 1, , e, , (also known as ). For exampl...

12 mois il y a

A résolu


Evaluate Deterministic Finite Automata on String
Given a Deterministic Finite Automata (DFA) and a string, determine whether or not the DFA will accept when ran on the string. A...

12 mois il y a

A résolu


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

12 mois il y a

A résolu


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

12 mois il y a

A résolu


Legend of Zelda - Rupee Count
Rupees are the main currency in The Legend of Zelda games. The value of each rupee is determined by its color. Unfortunately, th...

12 mois il y a

A résolu


From a given cell array of strings, extract the non-unique strings.
We are given a cell array of strings C. From this cell array we require to extract the subset of non-unique strings, returning t...

12 mois il y a

A résolu


Concatenate string with cell array of strings
Given a cell array of strings (a), a target string (b), and a target position (ind), return a cell array of strings (c) in which...

12 mois il y a

A résolu


longest common substring : Skipped character version
Two strings are given. Find the longest common substring between them. The substring characters need not be adjacent. They, howe...

12 mois il y a

A résolu


Adding Cells with numbers defined as strings
Given a cell, with strings representing numbers, add each value. For example: a = {'9','33'}; the output should be: ...

12 mois il y a

A résolu


Decrypt the cypher using XOR encryption (for beginners)
Inspired by Project Euler n°59 Each character on a computer is assigned a unique code and the preferred standard is ASCII (...

12 mois il y a

A résolu


Find the longest match inside two strings
Given two strings, find the longest string which is contained within both strings. e.g. the longest string that is contained ...

12 mois il y a

A résolu


Calculate the Damerau-Levenshtein distance between two strings.
<http://www.mathworks.co.uk/matlabcentral/cody/problems/2303-compute-hamming-distances-between-each-pair-of-rows-from-two-input-...

12 mois il y a

A résolu


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

12 mois il y a

A résolu


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

12 mois il y a

A résolu


Prime Letters = Removing
Given a string, remove all the letters which in ASCII Code are prime numbers. For Example: s1 = 'Determine which array e...

12 mois il y a

A résolu


Beauty of Parentheses
Given a string consisting of closed parentheses, form a string array in the following way so that the orders of these parenthese...

12 mois il y a

A résolu


Shorten pathname
Given a pathname string, return a condensed version by replacing intermediate folders with '..'. *Example* If fullpat...

12 mois il y a

A résolu


Genome decoding
Inspired by a question on the answer forum: You are given a matrix of 8-bit integers which encodes a genome. Each integer can...

12 mois il y a

A résolu


Did you say please? - Find one string within another without strfind or regexp/regexpi
For a given string sentence, determine if the string word 'please' is present or not. If so, return the string 'OK', else return...

12 mois il y a

A résolu


Convert a vector into numbers
Suppose a vector x = [ 1 2 4 7] is given. You have to convert this vector into string number y = '1247'. Examples x = [ 1...

12 mois il y a

A résolu


Dimensions of a rectangle
The longer side of a rectangle is three times the length of the shorter side. If the length of the diagonal is x, find the width...

12 mois il y a

A résolu


Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x. <<https://i.imgur.com/jlZDHhq.png>> Image courtesy of <http://up...

12 mois il y a

A résolu


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

12 mois il y a

A résolu


Side of a rhombus
If a rhombus has diagonals of length x and x+1, then what is the length of its side, y? <<https://imgur.com/x6hT6mm.png>> ...

12 mois il y a

A résolu


Area of an Isoceles Triangle
An isosceles triangle has equal sides of length x and a base of length y. Find the area, A, of the triangle. <<https://imgur...

12 mois il y a

A résolu


Is this triangle right-angled?
Given three positive numbers a, b, c, where c is the largest number, return true if the triangle with sides a, b and c is right-...

12 mois il y a

A résolu


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

12 mois il y a

A résolu


Find a Pythagorean triple
Given four different positive numbers, a, b, c and d, provided in increasing order: a < b < c < d, find if any three of them com...

12 mois il y a

A résolu


Triangle sequence
A sequence of triangles is constructed in the following way: 1) the first triangle is Pythagoras' 3-4-5 triangle 2) the second...

12 mois il y a

Charger plus