# How can I reduce time complexity on this algorithm?

Advertisements I have this exercise and the goal is to solve it with complexity less than O(n^2). You have an array with length N filled with event probabilities. Create another array in which for each element i calculate the probability of all event to happen until the position i. I have coded this O(n^2) solution.… Read More How can I reduce time complexity on this algorithm?