题目来自 Golang vs. Rust: Which Programming Language To Choose in 2023?[1] 141. Iterate in sequence over two lists Iterate in sequence over the elements of the list items1 then items2. For each iteration print the element. 依次迭代两个列表 依次迭代列表项1…
⭐️ 题目描述 🌟 leetcode链接:面试题 08.05.递归乘法
思路: A 3 , B 4 ,3 * 4 等价于 3 3 3 3。
代码:
int multiply(int A, int B){if (!B) {return 0;}return A multiply(A , B - 1);
}