[LeetCode] Minimum Number of Operations to Satisfy Conditions

3122. Minimum Number of Operations to Satisfy Conditions

You are given a 2D matrix grid of size m x n. In one operation, you can change the value of any cell to any non-negative number. You need to perform some operations such that each cell grid[i][j] is:

  • Equal to the cell below it, i.e. grid[i][j] == grid[i + 1][j] (if it exists).
  • Different from the cell to its right, i.e. grid[i][j] != grid[i][j + 1] (if it exists).

Return the minimum number of operations needed.

Read more
[LeetCode] Count the Number of Special Characters II

3121. Count the Number of Special Characters II

You are given a string word. A letter c is called special if it appears both in lowercase and uppercase in word, and every lowercase occurrence of c appears before the first uppercase occurrence of c.

Return the number of special letters in word.

Read more
[LeetCode] Count the Number of Special Characters I

3120. Count the Number of Special Characters I

You are given a string word. A letter is called special if it appears both in lowercase and uppercase in word.

Return the number of special letters in word.

Read more
[Codeforces] Round 914 (Div. 2) D2. Set To Max (Hard Version)Read more
[Codeforces] Round 914 (Div. 2) D1. Set To Max (Easy Version)Read more
[Codeforces] Round 912 (Div. 2) D1. Maximum And Queries (easy version)Read more
[Codeforces] Educational Round 158 (Rated for Div. 2) D. Yet Another Monster FightRead more
[Codeforces] Round 909 (Div. 3) F. Alex`s whimsRead more
[Codeforces] Round 910 (Div. 2) C. Colorful GridRead more
[Codeforces] CodeTON Round 7 (Div. 1 + Div. 2, Rated, Prizes!) D. Ones and TwosRead more