Altimetrik Interview Question

windows function in spark scala