Tap here to switch tabs
Problem
Submissions

Problem: Find the Largest Almost Missing Integer

med
30 min
Try to solve the Find the Largest Almost Missing Integer problem.

Statement

You are given an integer array nums and an integer k.

An integer is considered almost missing if it appears in exactly 11 contiguous subarray of nums of size k.

Return the largest almost missing integer. If no such integer exists, return −1-1.

Constraints:

  • 1≤1 \leq nums.length ≤50\leq 50

  • 0≤0 \leq nums[i] ≤50\leq 50

  • 1≤1 \leq k ≤\leq nums.length

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Find the Largest Almost Missing Integer

med
30 min
Try to solve the Find the Largest Almost Missing Integer problem.

Statement

You are given an integer array nums and an integer k.

An integer is considered almost missing if it appears in exactly 11 contiguous subarray of nums of size k.

Return the largest almost missing integer. If no such integer exists, return −1-1.

Constraints:

  • 1≤1 \leq nums.length ≤50\leq 50

  • 0≤0 \leq nums[i] ≤50\leq 50

  • 1≤1 \leq k ≤\leq nums.length