DescriptionObjective: We need to implement a function called getThirdDuplicate that takes an array of integers as input and returns the third duplicate value in the array.
Acceptance Criteria:
[ ] The function should return the third duplicate that appears in the array.
[ ] If there are fewer than three duplicates, the function should return null or a suitable message indicating that.
[ ] The function should maintain the order of duplicates as they appear in the array.
Description Objective: We need to implement a function called getThirdDuplicate that takes an array of integers as input and returns the third duplicate value in the array.
Acceptance Criteria:
Example Input: int[] arr = {3, 4, 5, 6, 1, 3, 4, 9, 0, 3, 4, 3, 3, 9};
Example Output: 9