Given a given stock for a specific day. One number per second stored in an array. Write an algorithm to find the maximum profit you could make in that day. Generalize to several months of data with ticks per milliseconds.
Sigiloso
Possible in O(N) by keeping track of min_val and max_profit. For generalization, same thing in MapReduce.