Solved


Highest building

1 year ago

Solved


Sort Except Zeros
Sort the numbers in a vector. But the position of zeros should not be changed. Example: sort_except_zeros( [5 3 0 0 2 4] ) == [...

1 year ago

Solved


Replace values out of an interval with the lower or upper values
For a vector or matrix X and an interval [n1,n2], the function replace every element of x inferior to n1 by n1, and every elemen...

1 year ago

Solved


Interval Compression
Given a set of integers, the task is to create a list of closed intervals where each interval includes its endpoints. For exampl...

1 year ago

Solved


Out-of-Place Elements Count
Determine the number of elements in a list of integers that are not in their original order after sorting the list in ascending ...

1 year ago

Solved


Give a matrix that matches itself when rotated
Given n and s, return a n-by-n matrix a of integers such that sum(sum(a == rot90(a))) is equal to exactly s. The integer...

1 year ago

Solved


Dancing with wolves?
let wolf() make one or two steps to get a feel of the beat, it is waltz, do not let wolf() make the third step, return safely ju...

1 year ago

Solved


Wind Chill Computation
On a windy day, a temperature of 15 degrees may feel colder, perhaps 7 degrees. The formula below calculates the "wind chill," i...

1 year ago

Solved


Finding area of a triangle.
Find the area of an equalateral triangle with sides of 3 inches,

1 year ago

Solved


Compute LOG(1+X) in natural log
Compute LOG(1+X) in natural log

1 year ago

Solved


10% Discount

1 year ago

Solved


The Number of Ways
Find all the possible ways to reach the end of a matrix. So given [a b c d] the possible ways [a c],[a d],[b c],[b ...

1 year ago

Solved


Number of paths on a n-dimensional grid
This problem is inspired by <https://www.mathworks.com/matlabcentral/cody/problems/1483-number-of-paths-on-a-grid> and <https:/...

1 year ago

Solved


Number of paths on a 3d grid
This problem is inspired by <https://www.mathworks.com/matlabcentral/cody/problems/1483-number-of-paths-on-a-grid>, which you mi...

1 year ago

Solved


Triangle of numbers
Create a matrix with the integers from 1 to |n| arranged in a triangular shape. Every row |i| of the matrix contains |i| inte...

1 year ago

Solved


Vector push
Append an element |x| to the end of the vector |v| and return both the extended vector and the new number of its elements. |x| c...

1 year ago

Solved


Eye Squared
For a positive integer |n| create the identity matrix with |n| elements. In case it is not possible to produce an identity ma...

1 year ago

Solved


Product of Each Column
Given a matrix |mat| with |n| columns, return a row vector |v| of length |n|, where every element in |v| is the product of the |...

1 year ago

Solved


How many Integers?
Count the integers in a given vector |v|. You *must* use a loop to count each element separately. Examples: Input: v...

1 year ago

Solved


Spot the outlier
All points except for one lie on a line. Which one is the outlier? Example: You are given a list of x-y pairs in a column ...

1 year ago

Solved


Octoberfest festival
A group of students decided to visit Octoberfest festival. First they ordered one beer, then after half-hour they taken one more...

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

1 year ago

Solved


Electrical Diode Current Calculation
In engineering, there is not always a single equation that describes a phenomenon accurately enough to be applied in all instanc...

1 year ago

Solved


ranch area?
Your friend has a ranch with four distinct boundary lines. Three boundary lines are ideal straight roads: (1) North Club Road, (...

1 year ago

Solved


Basic electricity in a dry situation
&#9889 &#9889 &#9889 &#9889 &#9889 &#9889 &#9889 &#9889 &#9889 &#9889 &#9889 &#9889 &#9889 &#9889 &#9889 &#9889 &#9889 &#9889 &#...

1 year ago

Solved


Sum of adjacent elements in a vector
Given a vector v, return a vector s containting the sum of every two adjacent elements in the vector. Every element s(i) cont...

1 year ago

Solved


Force and Motion 3
Two robots push on a large object in the same direction. One robot pushes with a force of F1 Newtons and the other with a force...

1 year ago

Solved


How many trades represent all the profit?
Given a list of results from trades made: [1 3 -4 2 -1 2 3] We can add them up to see this series of trades made a profit ...

1 year ago

Load more