Max Change in Consecutive Elements
If an array is given as input then find the index of consecutive elements that represent maximum change.
Example:
Input ...
4年弱 前
解決済み
expand intervals
You're given a row vector of an even number of monotonically increasing integers. Each pair of consecutive integers is the lower...
4年弱 前
解決済み
compress sequence into intervals
You're given a row vector of monotonically increasing integers most of which are consecutive. Find the upper and lower bounds of...
4年弱 前
解決済み
expand intervals vol.2
Similar to problem <http://www.mathworks.co.uk/matlabcentral/cody/problems/2528 2528>. This is a more general case, when bounds ...
4年弱 前
解決済み
expand intervals vol.3
This is the next problem after <http://www.mathworks.co.uk/matlabcentral/cody/problems/2528 2528> and <http://www.mathworks.co.u...
4年弱 前
解決済み
Is A the inverse of B?
Given a matrix A and a matrix B, is A the inverse of B?
>>A=[2,4;3,5];
>>B=[-2.5,2;1.5,-1];
>>isInverse...
4年弱 前
解決済み
Rotate Matrix @180 degree
Rotate Matrix @180 degree
Example
A=[8 1 6; 3 5 7; 4 9 2], then answer would be
[2 9 4;...
factorial
There are really some cody problems related to factorial of n, e.g., 42667, 45184, 46054, and etc. It is interesting to ask why ...
4年弱 前
解決済み
n-th digit of write-down all numbers
Write down number as
123456789101112131415161718192021222324252627282930...
what's the n-th digit? input n and get the digit.
4年弱 前
解決済み
Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...
Connect Four Win Checker
<http://en.wikipedia.org/wiki/Connect_Four Connect Four> is a game where you try to get four pieces in a row. For this problem, ...