Virtusa Interview Question

Array subsequence pattern leetcode question