Tibra Interview Question

problem solving dynamic programming time series.