TAASEQ - editorial

thanks!
it has been submitted!

@likecs i did the way u did but got wa did u got ac

1 Like

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

1 Like

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.