Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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.

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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]

mehr als 8 Jahre vor

Gelöst


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)

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Gelöst


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

mehr als 8 Jahre vor

Mehr laden