First And Last Occurrences In Array Leetcode Questions