October 25th, 2013, 4:17 am
Data givena) A series of real numbers "S" of length "N"b) A real number "x"c) A boolean "greaterThan"############################You are allowed to use the following math operators only(All operators operate on entire vector), you can't walk through each element in the series(Like by using a for loop in programming).i) Series[vector of boolean expression] = y ---> modify a series elements based on boolean expressionii) Cumsum --> cumulative sumiii) Hadamard productiv) Modulo operator on a vector --> reminderv) Min/max operator on a vectorvi) Use other vectors(but populate them with methods explained in above steps only)############################Can you find thea) Maximum number of "consecutive numbers in the series S > x"if (greaterThan = TRUE)b) Maximum number of "consecutive numbers in the series S <= x"if (greaterThan = FALSE)Using least number of steps?
Last edited by
FritzJacob on October 25th, 2013, 10:00 pm, edited 1 time in total.