Recursive Weighted Sum of Array | FE Prep