Pergunta de entrevista da empresa Meta

Given an array of integers, return the length of the longest arithmetic sequence