Windborne Lantern Parade
This problem feels like a little puzzle you can solve one step at a time. In Windborne Lantern Parade, you are trying to work toward the right number by following one clear idea.
Calculate windborne lantern parade 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 tiers = 5, the answer is 63. Five tiers follow the ritual, filling the sky with sixty-three lanterns. Another example is tiers = 3, which gives 15. The third tier adds a lantern and repeats the earlier tiers twice.
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
Five tiers follow the ritual, filling the sky with sixty-three lanterns.
The third tier adds a lantern and repeats the earlier tiers twice.
Only the first lantern glider is airborne.
Algorithm Flow

Best Answers
class Solution {
public int windborne_lantern_parade(int tiers) {
int result = 1;
for (int i = 0; i < tiers; i++) {
result = 1 + 2 * result;
}
return result;
}
}Comments (0)
Join the Discussion
Share your thoughts, ask questions, or help others with this Challenge.
