Frage im Vorstellungsgespräch bei Media.net

Dsa problem. Longest subsequence in array which is a arithmetic progression. Standard do solution.