Leetcode 3584. Maximum Product of First and Last Elements of a Subsequence | Hello Interview