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

plus de 2 ans 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...

plus de 2 ans 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...

plus de 2 ans 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...

plus de 2 ans 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...

plus de 2 ans 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...

plus de 2 ans il y a

A résolu


Cat, Meowcat and Concatenation
Input is a cell array containing several strings. Find the largest continuous sub-string common to all strings. All strings are ...

plus de 2 ans 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...

plus de 2 ans 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 ...

plus de 2 ans il y a

A résolu


Broken numlock key, oppps !
The numlock key on my computer is pressed and is now broken, so I cant press it to switch off the numlock mode. And hence I am n...

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


Reverse within string
If input is a string 'yellow' the output should be 'leywol'. Locate the middle of the string and reverse the first (yel) and sec...

plus de 2 ans il y a

A résolu


Chain multiplication - 02
Following up on the problem in 55295, you found the number of multiplications needed to multiply two matrices. Now, you are giv...

plus de 2 ans il y a

A résolu


Find an optimal placement of coolers on a grid
In a certain chemical plant, 6 new pieces of cooling equipment (coolers) are to be installed in a vacant space. This vacant spac...

plus de 2 ans 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...

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


Sub-sequence - 01
Find the length of the longest increasing subsequence in the given array. a=[2,4,2,1,3,5,6] longest increasing subsequen...

plus de 2 ans il y a

A résolu


Is this group simply connected?
Given connectivity information about a graph, your job is to figure out if the graph is fully connected. You are given a list of...

plus de 2 ans il y a

A résolu


Word Ladder
Given a set of words, and two other words - start and destination, Find the smallest chain from start to the destination such...

plus de 2 ans il y a

A résolu


Quarantine Days
In these quarantine days, a list of what Max may do on a typical day is given in a table with the starting hour to ending hour. ...

plus de 2 ans il y a

A résolu


The Tortoise and the Hare - 02
Previous problem <https://www.mathworks.com/matlabcentral/cody/problems/45425-the-tortoise-and-the-hare-01> Suppose in an inf...

plus de 2 ans il y a

A résolu


The Tortoise and the Hare - 01
Suppose in an infinitely long line, the hare is standing in position 0. From that place, it can jump either in the +ve direct...

plus de 2 ans 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-...

plus de 2 ans il y a

A résolu


Coin Distribution - 02
Prev prob <https://www.mathworks.com/matlabcentral/cody/problems/45385-coin-distribution> Given a set of coins and an amount,...

plus de 2 ans il y a

A résolu


Coin distribution
Imagine, u r in a shop. ur bill is n(2200). u want to pay the bill with minimum no of coins u have. u've coins of - 2000,1000...

plus de 2 ans il y a

A résolu


Whole Number Concatenator
Write a function that concatenates whole numbers. For example: numcat(111,222) should return 111222 numcat(1,2,3,4,5) s...

plus de 2 ans il y a

A résolu


The number of trailing zero digit of a factorial
For given positive integer n, take factorial of that number. How many trailing zeros does it have? Example: factorial(11) = 3...

plus de 2 ans il y a

A résolu


Lunar Arithmetic (Multiplication)
<https://oeis.org/A087061 OEIS link for a description of lunar arithmetic> Simply take the larger digit when adding and take ...

plus de 2 ans il y a

A résolu


Lunar Arithmetic (Addition)
<https://oeis.org/A087061 OEIS link for a description of lunar arithmetic> Simply take the larger digit. Example 1: ...

plus de 2 ans il y a

Charger plus