Gelöst


Find the Oldest Person in a Room
Given two input vectors: * |name| - user last names * |age| - corresponding age of the person Return the name of the ol...

18 Tage vor

Gelöst


Convert from Fahrenheit to Celsius
Given an input vector F containing temperature values in Fahrenheit, return an output vector C that contains the values in Celsi...

18 Tage vor

Gelöst


Calculate Amount of Cake Frosting
Given two input variables r and h, which stand for the radius and height of a cake, calculate the surface area of the cake you n...

18 Tage vor

Gelöst


Sum of series I
What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?

18 Tage vor

Gelöst


NO _________ ALLOWED....
So you're given a sentence where if there is a particular word in the sentence then the output is 1, if it is not there then the...

18 Tage vor

Gelöst


Convert Two Character String into a Binary Vector
Given a string "XOXXO" convert it into a binary vector. [1 0 1 1 0] Paul Berglund implemented an optimal method in <http://ww...

18 Tage vor

Gelöst


Count letters occurence in text, specific to words with a given length.
Build a function with two input arguments: a string and a word length (number of letters), that outputs a vector of counts of th...

18 Tage vor

Gelöst


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

18 Tage vor

Gelöst


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

18 Tage vor

Gelöst


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

18 Tage vor

Gelöst


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

18 Tage vor

Gelöst


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

18 Tage vor

Gelöst


Matrix Construction I
Given n, construct a matrix as shown in the example below. Example For n=8, the output should look like this: 1 2 3 4 ...

18 Tage vor

Gelöst


Create a block diagonal matrix
A block diagonal matrix is a square matrix that can be written as A = [a 0 0 0 0 b 0 0 0 0 c 0 ...

18 Tage vor

Gelöst


Rainbow matrix
Create a "rainbow matrix" as described in the following examples Input = 3 Output = [ 1 2 3 2 3 2 ...

18 Tage vor

Gelöst


Generate this matrix
Generate the following matrix. n = 2; out = [-4 -3 -2 -1 0 -3 -2 -1 0 1 -...

18 Tage vor

Gelöst


Pascal's pyramid
In Pascal's triangle each number is the sum of the two nearest numbers in the line above: 1 1 1 ...

18 Tage vor

Gelöst


Triangular matrices in 3D array
Given a 3D numeric array _x_, return an array _y_ of the same size in which all entries to the right of the main diagonal are ze...

18 Tage vor

Gelöst


Numbers spiral diagonals (Part 2)
Inspired by Project Euler n°28 and 58. A n x n spiral matrix is obtained by starting with the number 1 and moving to the right ...

18 Tage vor

Gelöst


Toeplitz Matrix
For a given square matrix of order n-by-n check whether this is a Toeplitz matrix or not. Return true if it is.

18 Tage vor

Gelöst


ZigZag matrix with reflected format
ZigZag MATRIX with REFLECTED format. We have only input x. We have to create a matrix in the following pattern. input n=5...

18 Tage vor

Gelöst


The Five Infection (Boss Level)
Given a 3x3 matrix A, replace: every value that is equal to five every value that is directly adjacent to a five with zero in...

18 Tage vor

Gelöst


Fives Begone
Given any sentence as an input value 'sentence', turn all fives into the letter X and return the improved sentence. Also, turn a...

18 Tage vor

Gelöst


Broken Clock
Create a function that outputs t, an inputted matrix time x, in hours and minutes (hr:min) unless the time contains a five. In t...

18 Tage vor

Gelöst


No Fives Permitted
Create a function that gives users an custom error message if the matrix A contains a five. The error message should say "No Fiv...

18 Tage vor

Gelöst


A Fiveless Factorial
Given a positive integer x, compute its factorial y, but exclude any muliplication by five if applicable.

18 Tage vor

Gelöst


Don't Sum a Five
Create a function that sums the first and last element of a muti-element vector unless the value of one of the elements is 5. Do...

18 Tage vor

Gelöst


Don't Include a Five (Part Two)
Given a vector A with at least one non-five, return vector B, with all fives excluded (not replaced by zeros).

18 Tage vor

Gelöst


Don't Include a Five
Given a vector A, return vector B with all 5s replaced with 0s.

18 Tage vor

Gelöst


High Five!
Write a function that takes a number x and returns y = 'High Five' if x is not equal to five. Return y = 'Denied' if the number ...

18 Tage vor

Mehr laden