thanks!

it has been submitted!

If did not get AC, I would not have discussed the approach in detail, rather asked for help :P. As, per your question, I got AC

f[0] means βIs it an AP with first 0 elements?β - Yes it is. So, f[0] = true

f[1] means βIs it an AP with first 1 elements?β - Yes, a single element is in AP so, f[1] = true;

similarly, f[2] is true since any two numbers will always be in AP.

And same is true if we took elements from backwards. Hope it helps.

f[0] means βIs it a AP with 0 first elements?β - Yes it is. So, f[0] = true

f[1] means β--------------- 1 --------------?β - Yes, a single element is in AP so, f[1] = true;

similarly, f[2] is true since any two numbers will always in AP.

And same is true if we took elements from backwards. Hope it helps.