FIFA World Cup 2014 : Offside
This problem is about offside rule in football (soccer).
Input is a matrix with mostly zeros and a few 1, 2, 3 and 4s. A zer...
5 years ago
Solved
Rainbow matrix
Create a "rainbow matrix" as described in the following examples
Input = 3
Output = [ 1 2 3
2 3 2
...
Elements with highest local average
Input v is a row vector such that length(v)>3. Consider a sliding window of length 3 that is used to calculate the local average...
5 years ago
Solved
Integer Sequence - 1
Check the test suite to determine the relationship between input integer scalar and output integer scalar.
Closely related?
Given a function past_records() that will report blood sugar level of two twin brothers some random number of days ago. For exam...
5 years ago
Solved
Generate this matrix
For a given odd integer n, generate a matrix as follows:
Input: n = 5;
Output:
[ 2 1 0 0 0
1 ...
5 years ago
Solved
Graph Algorithms - 2 : Chromatic Number
Chromatic number of a graph is the minimum number of distinct colors required to color all the vertices of the graph such that n...