Emberstone Step Glow
This problem feels like a little puzzle you can solve one step at a time. In Emberstone Step Glow, you are trying to work toward the right number by following one clear idea.
Illuminate emberstone step markers recursively 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 terraces = 2, the answer is 21. The second terrace adds one ember and mirrors the earlier route four times. Another example is terraces = 5, which gives 1365. Five terraces maintain the rule, revealing a glowing path of 1365 embers.
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
The second terrace adds one ember and mirrors the earlier route four times.
Five terraces maintain the rule, revealing a glowing path of 1365 embers.
Only the first emberstone glows.
Algorithm Flow

Best Answers
class Solution {
public int emberstone_step_glow(int[] nums, int k, int s) {
int total = 0;
for (int i = 0; i <= k; i++) {
int idx = i * s;
if (idx < nums.length) {
total += nums[idx];
}
}
return total;
}
}Comments (0)
Join the Discussion
Share your thoughts, ask questions, or help others with this Challenge.
