1) Write a function which determines wheather in given array there is a sequence of n or more elements, which have the same value. Example:
n = 3, input[] = { 1,1,1,2,3,4,5 } gives true;
n = 2, input[] = { 5,1,2,2,2,4,5 } gives true;
n = 3, input[] = { 5,2,2,3,2,5,5 } gives false;
2) Write a function which determines, wheather the array is a mirror - reflection - like. Example:
input[] = {1,2,3,2,1} gives true
input[] = {1,2,3,3,2,1} gives true.
Saturday, October 18, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment