Leetcode 1027. Longest Arithmetic Subsequence | Hello Interview