Resuelto


Put m balls into n boxes
Can you find all the cases where, if I put 3 balls into 2 boxes the case is 1 1 1 1 1 2 1 ...

alrededor de 3 años hace

Resuelto


Which permutation is it?
Let write some permutations of positive integers. 1: 1 2 3 4 5 6 ... 2: 2 1 3 4 ... 3: 1 3 2 4 ....

alrededor de 3 años hace

Resuelto


Create Combination
Motivation: In many problems, we need to create combinations with the function nchoosek. In some cases, however, choices are lim...

alrededor de 3 años hace

Resuelto


Next lexicographic - permutation
Find next lexicographic - permutation (permutations as it would occur in a dictionary order). E.g: nextP('ABCD') = ABDC If you...

alrededor de 3 años hace

Resuelto


Repopulate the City
For any population p of positive integers between pmin and pmax, we can calculate histogram count n for a list of evenly dividin...

alrededor de 3 años hace

Resuelto


Join Strings with Multiple Different Delimiters
The idea is to form the string S by interleaving the elements of a cell array of strings DELIMITER and another cell array of st...

alrededor de 3 años hace

Resuelto


Simple Decoder Ring
The stereotypical _decoder ring_ is remembered as a cereal box prize from the 1950s. Kids learned about cryptography by startin...

alrededor de 3 años hace

Resuelto


Is the paranthesis sequence balanced ?
Quantum mechanics and computer science are interested in bra-kets. Today however you, the player, will have to write a function ...

alrededor de 3 años hace

Resuelto


Alternately upper-lower case
Modify the string to alternate between upper and lower case. For example, s='achyuta' output='AcHyUtA' Update - Test case...

alrededor de 3 años hace

Resuelto


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

alrededor de 3 años hace

Resuelto


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

alrededor de 3 años hace

Resuelto


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

alrededor de 3 años hace

Resuelto


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

alrededor de 3 años hace

Resuelto


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

alrededor de 3 años hace

Resuelto


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

alrededor de 3 años hace

Resuelto


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

alrededor de 3 años hace

Resuelto


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

alrededor de 3 años hace

Resuelto


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

alrededor de 3 años hace

Resuelto


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

alrededor de 3 años hace

Resuelto


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

alrededor de 3 años hace

Resuelto


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

alrededor de 3 años hace

Resuelto


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

alrededor de 3 años hace

Resuelto


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

alrededor de 3 años hace

Resuelto


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

alrededor de 3 años hace

Resuelto


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

alrededor de 3 años hace

Resuelto


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

alrededor de 3 años hace

Resuelto


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

alrededor de 3 años hace

Resuelto


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

alrededor de 3 años hace

Resuelto


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

alrededor de 3 años hace

Resuelto


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

alrededor de 3 años hace

Cargar más