Counting order preserving displacements of elements in a list.
The problem is as follows:
Consider an ordered list of positive integers with possible zeros in between. Example:
[0, 1, 0, 0, 2]
The question is, how many possible displacements of these positive numbers do exist such that the list still remains ordered.