Given an integer array nums, a triplet of indices (i, j, k) is called a good triplet if nums[i] == nums[j] == nums[k].
The distance of a good triplet (i, j, k) is defined as
Return the minimum distance among all good triplets in nums. If no good triplet exists, return
Constraints:
nums.length
nums[i]
Given an integer array nums, a triplet of indices (i, j, k) is called a good triplet if nums[i] == nums[j] == nums[k].
The distance of a good triplet (i, j, k) is defined as
Return the minimum distance among all good triplets in nums. If no good triplet exists, return
Constraints:
nums.length
nums[i]