mirror of https://github.com/doocs/leetcode.git
|
…
|
||
|---|---|---|
| .. | ||
| README.md | ||
| README_EN.md | ||
README_EN.md
08.05. Recursive Mulitply
Description
Write a recursive function to multiply two positive integers without using the * operator. You can use addition, subtraction, and bit shifting, but you should minimize the number of those operations.
Example 1:
Input: A = 1, B = 10 Output: 10
Example 2:
Input: A = 3, B = 4 Output: 12
Note:
- The result will not overflow.
Solutions
Python3
Java
...