Update appNew update is available. Click here to update.
sidenav-btnClose
Topic list
Multiply Strings
MEDIUM
35 mins
38 upvotes
Strings
Topics (Covered in this problem)
Problem solved
Badge
Skill meter
Strings
-
-
Other topics
Problem solved
Badge
Skill meter
Matrices (2D Arrays)
-
-
Linked List
-
-
Sorting
-
-
Binary Search
-
-
Stacks & Queues
-
-
Trees
-
-
Graph
-
-
Dynamic Programming
-
-
Greedy
-
-
Tries
-
-
Arrays
-
-
SQL
-
-
Binary Search Trees
-
-
Heap
-
-
Bit Manipulation
-
-
Solve problems & track your progress
Checkout your overall progress in every topic here
Become
userLevel
Sensei
in DSA topics
Open the topic and solve more problems associated with it to improve your skills
Check out the skill meter for every topic
See how many problems you are left with to solve for cracking any stage. Score more than zero to get your progress counted.

Multiply Strings

Medium
yellow-spark
0/80
Avg time to solve 35 mins
Success Rate 55 %
Share
38 upvotes

Problem Statement

You are given two big numbers ‘A’ and ‘B’ as strings. Your task is to find the product of both the numbers.

Note:

There are no leading zeros in both the strings, except the number 0 itself.
Do not use any built-in Big Integer Library.
For Example:
If, A = 123, and B = 456.
So the product of both numbers will be 56088.
Detailed explanation ( Input/output format, Notes, Constraints, Images )
Sample Input 1:
2
17281 
91276
123
456
Sample Output 1:
1577340556
56088    
Explanation for sample 1:
For the first test case:
A=17281, and B=91276
The product of both numbers is 1577340556.

For the second test case:
A=123, B=456
The product of both numbers is 56088
Sample Input 2:
1
5
10
Sample output 2:
50
Reset Code
Full screen
Auto
copy-code
Console