TikTok interview question

Longest arithmetic subsequence Image carousel with smooth transitions