Aurora Feather Lights
You can think of this as a small game with a very specific goal. In Aurora Feather Lights, you are trying to work toward the right number by following one clear idea.
Calculate feather lantern sequence growth pattern A good way to think about it is to first understand what goes in, then what rule you must follow, and finally what shape the answer should have.
For example, if the input is sweeps = 4, the answer is 341. Four sweeps follow the rule, producing three hundred forty-one shimmering feathers. Another example is sweeps = 0, which gives 1. Only the opening feather lantern glows.
This is a friendly practice problem, but it still rewards careful reading. The key is understanding the rule clearly and then applying it carefully.
One helpful habit is to say the rule out loud in your own words before you start solving. If you can explain what counts, what changes, and what the final answer should look like, you are already much closer to the right solution.
Example Input & Output
Four sweeps follow the rule, producing three hundred forty-one shimmering feathers.
Only the opening feather lantern glows.
The second sweep adds one feather and echoes the earlier light four times.
Algorithm Flow

Best Answers
class Solution {
public int aurora_feather_lights(int sweeps) {
int total = 0;
for (int i = 0; i <= sweeps; i++) {
total += (int) Math.pow(4, i);
}
return total;
}
}Comments (0)
Join the Discussion
Share your thoughts, ask questions, or help others with this Challenge.
