BABEL Interview Question

A sliding window calculation challenge