Implement valid 1D convolution with bias | IBM Interview Question