give integer array arr integer difference return length long subsequence arr arithmetic sequence difference adjacent element subsequence equal differencea subsequence sequence derive arr delete element change order remain element Example 1input arr 1234 difference 1output 4explanation the long arithmetic subsequence 1234example 2input arr 1357 difference 1output 1explanation the long arithmetic subsequence single elementExample 3input arr 157853421 difference 2output 4explanation the long arithmetic subsequence 7531 Constraints1 arrlength 105104 arri difference 104