[LeetCode] Count Complete Subarrays in an Array

2799. Count Complete Subarrays in an Array

You are given an array nums consisting of positive integers.

We call a subarray of an array complete if the following condition is satisfied:

  • The number of distinct elements in the subarray is equal to the number of distinct elements in the whole array.

Return the number of complete subarrays.

A subarray is a contiguous non-empty part of an array.

Read more
[LeetCode] Number of Employees Who Met the Target

2798. Number of Employees Who Met the Target

There are n employees in a company, numbered from 0 to n - 1. Each employee i has worked for hours[i] hours in the company.

The company requires each employee to work for at least target hours.

You are given a 0-indexed array of non-negative integers hours of length n and a non-negative integer target.

Return the integer denoting the number of employees who worked at least target hours.

Read more
[Codeforces] Round 547 (Div. 3) F2. Same Sum Blocks (Hard)Read more
[Codeforces] Round 547 (Div. 3) F1. Same Sum Blocks (Easy)Read more
[Codeforces] Round 547 (Div. 3) G. Privatization of Roads in TreelandRead more
[Codeforces] Forethought Future Cup - Final Round (Onsite Finalists Only) B. Chladni FigureRead more
[Codeforces] Round 551 (Div. 2) D. Serval and Rooted TreeRead more
[Codeforces] Educational Round 63 (Rated for Div. 2) D. Beautiful ArrayRead more
[Codeforces] Round 555 (Div. 3) D. N Problems During K DaysRead more
[Codeforces] Round 562 (Div. 1) B. Good TripleRead more