Hard Problemscountingcombinatoricsgrid
Count of AP Subsequences
Given an array of numbers, count the subsequences of length three or more whose elements form an arithmetic progression, meaning each chosen value after the first differs from the one before it by the same fixed amount.
Do this lesson first: climbing stairsThe full breakdown and animated table for this problem are still being written. In the meantime, run the four questions on it yourself — that is the whole exercise.