14
Nhiệm vụ
Java Collections, mức độ, bài học
Fibonacci numbers using recursion
Read about Fibonacci numbers.
Implement a recursive fibonacci method, where n is the number of an element in the Fibonacci sequence.
Don't create additional fields in the Solution class.
8
Nhiệm vụ
Java Collections, mức độ, bài học
Factorials using recursion
Read about how to calculate factorials.
Implement a recursive factorial method, where n is the number whose factorial needs to be calculated.
Don't create additional fields in the Solution class.
14
Nhiệm vụ
Java Collections, mức độ, bài học
Factorization using recursion
Separate the whole number n, where n > 1, into its prime factors.
Display all of its factors in ascending order, separated by spaces.
Write a recursive method to calculate the prime factors.
Don't create additional fields in the Solution class.
14
Nhiệm vụ
Java Collections, mức độ, bài học
Recursion for mathematical expressions
The input is a mathematical expression in the form of a String.
The expression may include whole numbers, fractional numbers, parentheses (), spaces, negative signs -, exponents ^, sin(x), cos(x), and tan(x).
14
Nhiệm vụ
Java Collections, mức độ, bài học
Tower of Hanoi
There are three rods. There are numRings rings stacked on rod A. Each ring has a different size and they're stacked from smallest
to largest (largest on the bottom). You need to move the pyramid of numRings rings from rod A to rod B in as few moves as possible.