Solved


Find the remainder - 02
Given an array of integers, find the remainder when the summation of all the elements is divided by N

10 months ago

Solved


Last Duplicate
Given an array of integers, find the last duplicate element — that is, the element whose second occurrence appears latest in the...

10 months ago

Solved


Create a Standard Size Vector
Given an input x, create a row vector y from 1 to x with 5 elements.

10 months ago

Solved


Resizing Matrices
Take an 4x3 matrix, and resize it to a 2x6 matrix

10 months ago

Solved


Finding an element in a vector
x is a vector of unknown length your function should return the index of the first element in the vector that is greater than...

10 months ago

Solved


Draw a '9' in a zero matrix!

10 months ago

Solved


Draw a '6' in a zero matrix!

10 months ago

Solved


Draw a '7' in a zero matrix!

10 months ago

Solved


Draw a '8' in a zero matrix!

10 months ago

Solved


Draw a '5' in a zero matrix!

10 months ago

Solved


Draw a '4' in a zero matrix!

10 months ago

Solved


Draw a '3' in a zero matrix!

10 months ago

Solved


Draw a '2' in a zero matrix!

10 months ago

Solved


Draw a '1' in a zero matrix!

10 months ago

Solved


Sum of Positive Elements in a Matrix
Given a matrix A, write a function that returns the sum of all positive elements in A. Input: A = [-3, 4, -1; 6, -2, 8] ...

10 months ago

Solved


Sum of Even Numbers in a Vector
Write a function that takes a vector x as input and returns the sum of all even numbers in x. Input: x = [1, 2, 3, 4, 5, 6] ...

10 months ago

Solved


0, 2, 0, -2, 0, 2, 0, -2, ...
Generate the first n terms of a periodic sequence defined as f(x) = 0, 2, 0, -2, 0, 2, 0, -2, ..., for x = 1, 2, 3, 4, 5, 6...

10 months ago

Solved


Reverse a string
Reverse the given string. Example input = 'reverse' output = 'esrever'

10 months ago

Solved


Find the largest number
Find the largest number |x| among 4 numbers given as variables |a|, |b|, |c|, and |d|. Example: Input: a = 4; b = 7; c ...

10 months ago

Solved


How many days in a month?
Return the number of days in a given month in 2017. If the input is not a valid month number, return -1. Examples: Input...

10 months ago

Solved


Separate even from odd numbers in a vector - without loops
*Without using loops*, rearrange a vector of integers such that the odd numbers appear at the beginning, and even numbers at the...

10 months ago

Solved


Add a vector to a matrix
Given a matrix |mat| of size |mXn| and a row vector |v| of size |1Xs|, return a matrix with |m+1| rows that conatains |mat| over...

10 months ago

Solved


Determine if a row vector has NaN
Determine if a row vector x has NaN

10 months ago

Solved


Select primes from the matrix.
Select primes from the matrix.

10 months ago

Solved


Sum positive elements of matrix.
Calculate sum of positive elements of the matrix.

10 months ago

Solved


Ratio between sum of primes and sum of factors
Write a function that calculates the ratio between the sum of primes numbers lower or equal to x, and the sum of the factors of ...

10 months ago

Solved


Alternating 1´s and 0´s in a matrix
Given an odd number n, write a function that creates a matrix y with dimension nxn alternating 1's and 0's, and starting with 1 ...

10 months ago

Solved


Say type of roots in quadratic equation
Given the coefficients of a quadratic equation, write a function that gives the output y='RealDifferent' if the roots are real a...

10 months ago

Solved


Get the mean digit
Write a function that gives the mean digit (round towards nearest integer) of an input and positive number. For example: x ...

10 months ago

Solved


Ratio between sums of prime and non-prime numbers
Write a function that calculates the ratio between the sum of the prime numbers lower or equal than x, and the sum of the non-pr...

10 months ago

Load more