[Hacker Earth] Alice`s JourneyRead more
[Hacker Earth] Plus and MinusRead more
[Codeforces] Round 332 (Div. 2) D. Spongebob and SquaresRead more
[Codeforces] Round 336 (Div. 1) B. ZumaRead more
[Codeforces] Round 339 (Div. 1) A. Peter and Snow BlowerRead more
[Codeforces] Round 339 (Div. 1) B. SkillsRead more
[Codeforces] Educational Round 7 D. Optimal Number PermutationRead more
[Codeforces] Experimental Educational Round: VolBIT Formulas Blitz E. A rectangleRead more
[Codeforces] Manthan, Codefest 16 C. Spy Syndrome 2Read more
[LeetCode] Find the Longest Equal Subarray

2831. Find the Longest Equal Subarray

You are given a 0-indexed integer array nums and an integer k.

A subarray is called equal if all of its elements are equal. Note that the empty subarray is an equal subarray.

Return the length of the longest possible equal subarray after deleting at most k elements from nums.

A subarray is a contiguous, possibly empty sequence of elements within an array.

Read more