PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/IBM

Implement valid 1D convolution with bias

Last updated: Mar 29, 2026

Quick Overview

This question evaluates implementation skills in numerical array processing, understanding of discrete convolution versus cross-correlation semantics, and handling of floating-point arithmetic within the Coding & Algorithms domain.

  • Medium
  • IBM
  • Coding & Algorithms
  • Software Engineer

Implement valid 1D convolution with bias

Company: IBM

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Take-home Project

Implement a 'valid' 1D convolution (no padding, stride = 1) over a numeric input array using a given kernel and scalar bias. Do not reverse the kernel (use cross-correlation semantics). Return an output array of length n − k + 1 where output[i] = sum_{j=0}^{k-1} input[i + j] * kernel[j] + bias. Handle floating-point values, and discuss time and space complexity.

Quick Answer: This question evaluates implementation skills in numerical array processing, understanding of discrete convolution versus cross-correlation semantics, and handling of floating-point arithmetic within the Coding & Algorithms domain.

Related Interview Questions

  • Reverse last two characters with space - IBM (nan)
  • Compute minimum rooms for meeting schedule - IBM (nan)
  • Maximize palindromic strings after character swaps - IBM (medium)
  • Find minimum subarray length with k distinct integers - IBM (medium)
  • Find minimum operations to make array sorted - IBM (easy)
IBM logo
IBM
Aug 14, 2025, 12:00 AM
Software Engineer
Take-home Project
Coding & Algorithms
1
0

Implement a 'valid' 1D convolution (no padding, stride =

  1. over a numeric input array using a given kernel and scalar bias. Do not reverse the kernel (use cross-correlation semantics). Return an output array of length n − k + 1 where output[i] = sum_{j=0}^{k-1} input[i + j] * kernel[j] + bias. Handle floating-point values, and discuss time and space complexity.

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More IBM•More Software Engineer•IBM Software Engineer•IBM Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.