Risolto


Test for balanced parentheses
Given the input inStr, give the boolean output out indicating whether all the parentheses are balanced. Examples: * If ...

oltre 8 anni fa

Risolto


Remove all the words that end with "ain"
Given the string s1, return the string s2 with the target characters removed. For example, given s1 = 'the main event' your ...

oltre 8 anni fa

Risolto


Fibonacci-Sum of Squares
Given the Fibonacci sequence defined by the following recursive relation, * F_n = F_(n-1) + F_(n-2) * where F_0 = 0 and F_1 ...

oltre 8 anni fa

Risolto


Return the Fibonacci Sequence
Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...

oltre 8 anni fa

Risolto


Time Expansion
How can you slow down any discrete-time signal? Example Input original signal x. x = [1 2 3 -1 -2 -5 -4] We want t...

oltre 8 anni fa

Risolto


concatenate the elements
you should concatenate the elements of a matrix in one dimensional array, for example if the input is A = [1 2 3; 4 5 6; 7 ...

oltre 8 anni fa

Risolto


More Simple String Concatenation
Take the first string input, reverse the order of the string from the end to beginning (i.e. apple becomes elppa), add a space a...

oltre 8 anni fa

Risolto


Automatic String Editing
In this function, you will take an incoming string, and output the same string with each character one letter later in the alpha...

oltre 8 anni fa

Risolto


Check if inputted variable is a string or a number
Check if a inputted variable is a number or a string, given a string input (i.e. '1' is 1 and thus a number, 'a' is a string).

oltre 8 anni fa

Risolto


Component area
Find the area of the component below, all measurements are in mm <<https://image.ibb.co/hocruF/Component.png>>

oltre 8 anni fa

Risolto


Back to basics 25 - Valid variable names
Covering some basic topics I haven't seen elsewhere on Cody. Given a string, return true if it is a valid MATLAB variable nam...

oltre 8 anni fa

Risolto


Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

oltre 8 anni fa

Risolto


Find the sum of the largest two elements in a vector
With this one, you have to find the two largest elements in a vector and output the sum of those numbers.

oltre 8 anni fa

Risolto


Extract leading non-zero digit
<http://en.wikipedia.org/wiki/Benford%27s_law Benford's Law> states that the distribution of leading digits is not random. This...

oltre 8 anni fa

Risolto


Summing Digits within Text
Given a string with text and digits, add all the numbers together. Examples: Input str = '4 and 20 blackbirds baked in a...

oltre 8 anni fa

Risolto


Trimming Spaces
Given a string, remove all leading and trailing spaces (where space is defined as ASCII 32). Input a = ' singular value deco...

oltre 8 anni fa

Risolto


Change matrix to vector
Vector is a matrix whose size is 1 x n or n x 1. Change matrix to vector. x = 4 3 5 1 ...

oltre 8 anni fa

Risolto


Get all prime factors
List the prime factors for the input number, in decreasing order. List each factor. If the prime factor occurs twice, list it as...

oltre 8 anni fa

Risolto


Rotate matrix by -90 degrees
Rotate a Matrix by -90 degrees Example: X = 1 2 3 4 5 6 7 8 9 output = 7 4 ...

oltre 8 anni fa

Risolto


Length of a short side
Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...

oltre 8 anni fa

Risolto


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

oltre 8 anni fa

Risolto


Find the mean of two vectors
Take two vectors, and output the mean of them (bonus if you don't use the in-built mean function)

oltre 8 anni fa

Risolto


Matrix Generation from Vector Multiplication
Output the matrix generated from multiplying two vectors together

oltre 8 anni fa

Risolto


Vector Element Multiplication
Take two incoming vectors, and output the element wise multiplication of the vectors.

oltre 8 anni fa

Risolto


Simple Vector Addition
Take two incoming vectors and output the sum of the two vectors

oltre 8 anni fa

Risolto


String Delimination and Outputting
In this problem, take an incoming string and deliminate the string based on spaces. Output the first string in between the space...

oltre 8 anni fa

Risolto


Simple String Concatenation
This is a simple problem involving taking two incoming strings, and outputting the concatenated string with a space separating t...

oltre 8 anni fa

Risolto


Project Euler: Problem 5, Smallest multiple
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smalle...

oltre 8 anni fa

Risolto


Maximum running product for a string of numbers
Given a string s representing a list of numbers, find the five consecutive numbers that multiply to form the largest number. Spe...

oltre 8 anni fa

Risolto


Area of square
Find the area of a square whose diagonal length is given as x.

oltre 8 anni fa

Carica altro