Solved


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<https://i.imgu...

4 years ago

Solved


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

4 years ago

Solved


Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...

4 years ago

Solved


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

4 years ago

Solved


Return area of square
Side of square=input=a Area=output=b

4 years ago

Solved


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

4 years ago

Solved


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

4 years ago

Solved


Add two numbers
Given a and b, return the sum a+b in c.

4 years ago

Solved


Compress strings (not springs)
Please remove excess space, limit one space between others, and no space before punctuation marks. * For example, 'Trendy , ...

4 years ago

Solved


Bang Bang in Bangalore
Imagine a strange language disorder, Bangolangosis, has developed among trigonometricians of <http://en.wikipedia.org/wiki/Banga...

4 years ago

Solved


Formatting currency numbers
Given a number, format it properly for textual display using the notation $xxx,xxx,xxx.xx. Assume that no more than two digits ...

4 years ago

Solved


English to Pig Latin Translator
Pig latin is a faux-language based off of English. The rules are as follows (excerpted from the wikipedia entry for Pig Latin): ...

4 years ago

Solved


Pig Latin to English Translator
Pig latin is a faux-language based off of English. The rules are as follows (excerpted from the <http://en.wikipedia.org/wiki/Pi...

4 years ago

Solved


Use of regexp
Given a string, containing several sentences, such as: 'I played piano. John played football. Anita went home. Are you safe?...

4 years ago

Solved


Transposition as a CIPHER
This all about transcripting a text message. If the input string is: *s1 = 'My name is Sourav Mondal'*, then the output is: *s2...

4 years ago

Solved


Number of 1s in a binary string
Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

4 years ago

Solved


String substitution, sub problem to cryptoMath
This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

4 years ago

Solved


Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

4 years ago

Solved


Convert a structure into a string
Convert the contents of each fields into a string. Example with an input structure s with 2 fields : s.age = '33' s....

4 years ago

Solved


Find mistyped words in text (mixed-up letters)
Mistyped words are a regular occurrence in emails, texts, status updates, and the like. Many times, people send or post a second...

4 years ago

Solved


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

4 years ago

Solved


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

4 years ago

Solved


Calculate the Levenshtein distance between two strings
This problem description is lifted from <http://en.wikipedia.org/wiki/Levenshtein_distance>. The Levenshtein distance betwee...

4 years ago

Solved


QWERTY Shift Code Decoder
Decode a string encoded using the QWERTY shift code. QWERTY shift code is where the message was touch typed but with an offse...

4 years ago

Solved


QWERTY Shift Encoder
Encode a string using the QWERTY shift code. This code is where you touch type but are offset by one character to the right. ...

4 years ago

Solved


Without the French accent please!
Suppress the French accent. Example 'Déjà présent' -> 'Deja present'

4 years ago

Solved


Ordinal numbers
Given an integer n, return the corresponding ordinal number as a character string. For example, ord(1)='1st' ord(2)=...

4 years ago

Solved


Shape Shifter - Part 1

4 years ago

Problem


Shape Shifter - Part 1

4 years ago | 2 | 6 solvers

Solved


Add more zeros
Find code that adds one 0 to each sequence of 0 in a string (composed with only 0 or 1). For example: '1010' -> '100100' ...

4 years ago

Load more