Home
Log in
DescriptionSubmissionsSolution
DescriptionSubmissionsSolution
Loading...

Log in to run or submit

num1 =
num2 =

Codey

Practise coding problems, test your solutions and track your progress.

Explore

  • Problems
  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Use

© 2026 Codey. Personal learning project.

Solution
Updated: 2026-02-23

Idea

Grade-school multiplication with an integer array.

Approach

Use res[i+j+1] += digit1 * digit2 for all pairs. Then propagate carries from right to left. Finally join digits, skipping leading zeros.

Code
Loading...
Complexity
Time: O(mn)
Space: O(m+n)
Solution
Updated: 2026-02-23

Idea

Grade-school multiplication with an integer array.

Approach

Use res[i+j+1] += digit1 * digit2 for all pairs. Then propagate carries from right to left. Finally join digits, skipping leading zeros.

Code
Loading...
Complexity
Time: O(mn)
Space: O(m+n)