#3471
Find the Largest Almost Missing Integer
pupil · 520 · lc easy +28 · 37.1% accepted · 107 likes · top 15%
Description
Given an integer array nums and integer k, call a value x "almost missing" if it appears in exactly one contiguous subarray of length k in nums.
Return the greatest almost missing value, or -1 if none exists.
Code
1
2
3