diff --git a/src/main/java/g3701_3800/s3737_count_subarrays_with_majority_element_i/Solution.java b/src/main/java/g3701_3800/s3737_count_subarrays_with_majority_element_i/Solution.java
new file mode 100644
index 000000000..1c4cda309
--- /dev/null
+++ b/src/main/java/g3701_3800/s3737_count_subarrays_with_majority_element_i/Solution.java
@@ -0,0 +1,22 @@
+package g3701_3800.s3737_count_subarrays_with_majority_element_i;
+
+// #Medium #Array #Hash_Table #Prefix_Sum #Counting #Divide_and_Conquer #Segment_Tree #Merge_Sort
+// #Senior #Biweekly_Contest_169 #2026_04_26_Time_1_ms_(100.00%)_Space_46.96_MB_(57.62%)
+
+public class Solution {
+ public int countMajoritySubarrays(int[] a, int target) {
+ int n = a.length;
+ int pre = n + 1;
+ int res = 0;
+ int[] count = new int[2 * n + 2];
+ int[] acc = new int[2 * n + 2];
+ count[pre] = acc[pre] = 1;
+ for (int i : a) {
+ pre += (i == target ? 1 : -1);
+ count[pre]++;
+ acc[pre] = acc[pre - 1] + count[pre];
+ res += acc[pre - 1];
+ }
+ return res;
+ }
+}
diff --git a/src/main/java/g3701_3800/s3737_count_subarrays_with_majority_element_i/readme.md b/src/main/java/g3701_3800/s3737_count_subarrays_with_majority_element_i/readme.md
new file mode 100644
index 000000000..1006f055a
--- /dev/null
+++ b/src/main/java/g3701_3800/s3737_count_subarrays_with_majority_element_i/readme.md
@@ -0,0 +1,53 @@
+3737\. Count Subarrays With Majority Element I
+
+Medium
+
+You are given an integer array `nums` and an integer `target`.
+
+Return the number of **non-empty subarrays** of `nums` in which `target` is the **majority element**.
+
+The **majority element** of a subarray is the element that appears **strictly** **more than half** of the times in that subarray.
+
+**Example 1:**
+
+**Input:** nums = [1,2,2,3], target = 2
+
+**Output:** 5
+
+**Explanation:**
+
+Valid subarrays with `target = 2` as the majority element:
+
+* `nums[1..1] = [2]`
+* `nums[2..2] = [2]`
+* `nums[1..2] = [2,2]`
+* `nums[0..2] = [1,2,2]`
+* `nums[1..3] = [2,2,3]`
+
+So there are 5 such subarrays.
+
+**Example 2:**
+
+**Input:** nums = [1,1,1,1], target = 1
+
+**Output:** 10
+
+**Explanation:**
+
+All 10 subarrays have 1 as the majority element.
+
+**Example 3:**
+
+**Input:** nums = [1,2,3], target = 4
+
+**Output:** 0
+
+**Explanation:**
+
+`target = 4` does not appear in `nums` at all. Therefore, there cannot be any subarray where 4 is the majority element. Hence the answer is 0.
+
+**Constraints:**
+
+* `1 <= nums.length <= 1000`
+* 1 <= nums[i] <= 109
+* 1 <= target <= 109
\ No newline at end of file
diff --git a/src/main/java/g3701_3800/s3738_longest_non_decreasing_subarray_after_replacing_at_most_one_element/Solution.java b/src/main/java/g3701_3800/s3738_longest_non_decreasing_subarray_after_replacing_at_most_one_element/Solution.java
new file mode 100644
index 000000000..24cf3ea96
--- /dev/null
+++ b/src/main/java/g3701_3800/s3738_longest_non_decreasing_subarray_after_replacing_at_most_one_element/Solution.java
@@ -0,0 +1,42 @@
+package g3701_3800.s3738_longest_non_decreasing_subarray_after_replacing_at_most_one_element;
+
+// #Medium #Array #Dynamic_Programming #Staff #Biweekly_Contest_169
+// #2026_04_26_Time_7_ms_(99.28%)_Space_123.88_MB_(5.07%)
+
+public class Solution {
+ public int longestSubarray(int[] nums) {
+ int n = nums.length;
+ if (n < 3) {
+ return n;
+ }
+ int i = 0;
+ int len1 = 0;
+ int len2 = 0;
+ int ans = 2;
+ while (i < n) {
+ int l = (i == 0) ? -1000 * 1000 * 10 : nums[i - 1];
+ int r = (i == n - 1) ? 1000 * 1000 * 10 : nums[i + 1];
+ if (l <= nums[i]) {
+ len2++;
+ ans = Math.max(len2 + 1, ans);
+ } else if (r >= nums[i]) {
+ int j = i;
+ len1 = len2;
+ while (j < n - 1 && nums[j] <= nums[j + 1]) {
+ j++;
+ }
+ len2 = j - i + 1;
+ ans = Math.max(len2 + 1, ans);
+ if (l <= r || (len1 > 1 && nums[i - 2] <= nums[i])) {
+ ans = Math.max(len1 + len2, ans);
+ }
+ i = j;
+ } else {
+ len2 = 0;
+ }
+ i++;
+ }
+ ans = Math.min(ans, n);
+ return ans;
+ }
+}
diff --git a/src/main/java/g3701_3800/s3738_longest_non_decreasing_subarray_after_replacing_at_most_one_element/readme.md b/src/main/java/g3701_3800/s3738_longest_non_decreasing_subarray_after_replacing_at_most_one_element/readme.md
new file mode 100644
index 000000000..d0542bca3
--- /dev/null
+++ b/src/main/java/g3701_3800/s3738_longest_non_decreasing_subarray_after_replacing_at_most_one_element/readme.md
@@ -0,0 +1,38 @@
+3738\. Longest Non-Decreasing Subarray After Replacing at Most One Element
+
+Medium
+
+You are given an integer array `nums`.
+
+You are allowed to replace **at most** one element in the array with any other integer value of your choice.
+
+Return the length of the **longest non-decreasing subarray** that can be obtained after performing at most one replacement.
+
+An array is said to be **non-decreasing** if each element is greater than or equal to its previous one (if it exists).
+
+**Example 1:**
+
+**Input:** nums = [1,2,3,1,2]
+
+**Output:** 4
+
+**Explanation:**
+
+Replacing `nums[3] = 1` with 3 gives the array [1, 2, 3, 3, 2].
+
+The longest non-decreasing subarray is [1, 2, 3, 3], which has a length of 4.
+
+**Example 2:**
+
+**Input:** nums = [2,2,2,2,2]
+
+**Output:** 5
+
+**Explanation:**
+
+All elements in `nums` are equal, so it is already non-decreasing and the entire `nums` forms a subarray of length 5.
+
+**Constraints:**
+
+* 1 <= nums.length <= 105
+* -109 <= nums[i] <= 109
\ No newline at end of file
diff --git a/src/main/java/g3701_3800/s3739_count_subarrays_with_majority_element_ii/Solution.java b/src/main/java/g3701_3800/s3739_count_subarrays_with_majority_element_ii/Solution.java
new file mode 100644
index 000000000..0c7ca8923
--- /dev/null
+++ b/src/main/java/g3701_3800/s3739_count_subarrays_with_majority_element_ii/Solution.java
@@ -0,0 +1,21 @@
+package g3701_3800.s3739_count_subarrays_with_majority_element_ii;
+
+// #Hard #Array #Hash_Table #Prefix_Sum #Divide_and_Conquer #Segment_Tree #Merge_Sort #Senior_Staff
+// #Biweekly_Contest_169 #2026_04_26_Time_3_ms_(100.00%)_Space_90.94_MB_(36.19%)
+
+public class Solution {
+ public long countMajoritySubarrays(int[] nums, int target) {
+ int n = nums.length;
+ int pre = n + 1;
+ long[] count = new long[2 * n + 2];
+ long[] acc = new long[2 * n + 2];
+ long res = 0;
+ count[pre] = acc[pre] = 1;
+ for (int a : nums) {
+ pre += (a == target ? 1 : -1);
+ acc[pre] = ++count[pre] + acc[pre - 1];
+ res += acc[pre - 1];
+ }
+ return res;
+ }
+}
diff --git a/src/main/java/g3701_3800/s3739_count_subarrays_with_majority_element_ii/readme.md b/src/main/java/g3701_3800/s3739_count_subarrays_with_majority_element_ii/readme.md
new file mode 100644
index 000000000..f8da05e77
--- /dev/null
+++ b/src/main/java/g3701_3800/s3739_count_subarrays_with_majority_element_ii/readme.md
@@ -0,0 +1,53 @@
+3739\. Count Subarrays With Majority Element II
+
+Hard
+
+You are given an integer array `nums` and an integer `target`.
+
+Return the number of **non-empty subarrays** of `nums` in which `target` is the **majority element**.
+
+The **majority element** of a subarray is the element that appears **strictly more than half** of the times in that subarray.
+
+**Example 1:**
+
+**Input:** nums = [1,2,2,3], target = 2
+
+**Output:** 5
+
+**Explanation:**
+
+Valid subarrays with `target = 2` as the majority element:
+
+* `nums[1..1] = [2]`
+* `nums[2..2] = [2]`
+* `nums[1..2] = [2,2]`
+* `nums[0..2] = [1,2,2]`
+* `nums[1..3] = [2,2,3]`
+
+So there are 5 such subarrays.
+
+**Example 2:**
+
+**Input:** nums = [1,1,1,1], target = 1
+
+**Output:** 10
+
+**Explanation:**
+
+All 10 subarrays have 1 as the majority element.
+
+**Example 3:**
+
+**Input:** nums = [1,2,3], target = 4
+
+**Output:** 0
+
+**Explanation:**
+
+`target = 4` does not appear in `nums` at all. Therefore, there cannot be any subarray where 4 is the majority element. Hence the answer is 0.
+
+**Constraints:**
+
+* 1 <= nums.length <= 105
+* 1 <= nums[i] <= 109
+* 1 <= target <= 109
\ No newline at end of file
diff --git a/src/main/java/g3701_3800/s3740_minimum_distance_between_three_equal_elements_i/Solution.java b/src/main/java/g3701_3800/s3740_minimum_distance_between_three_equal_elements_i/Solution.java
new file mode 100644
index 000000000..9aa0d85bd
--- /dev/null
+++ b/src/main/java/g3701_3800/s3740_minimum_distance_between_three_equal_elements_i/Solution.java
@@ -0,0 +1,24 @@
+package g3701_3800.s3740_minimum_distance_between_three_equal_elements_i;
+
+// #Easy #Array #Hash_Table #Mid_Level #Weekly_Contest_475
+// #2026_04_26_Time_1_ms_(99.99%)_Space_44.21_MB_(75.36%)
+
+public class Solution {
+ public int minimumDistance(int[] nums) {
+ int len = nums.length;
+ int[] last2 = new int[len];
+ int res = 200;
+ for (int i = 0; i < len; i++) {
+ int val = nums[i] - 1;
+ int pos = i + 1;
+ int pack = last2[val];
+ int old = pack & 255;
+ int cur = pack >> 8;
+ last2[val] = cur | (pos << 8);
+ if (old > 0) {
+ res = Math.min(res, (pos - old) << 1);
+ }
+ }
+ return res == 200 ? -1 : res;
+ }
+}
diff --git a/src/main/java/g3701_3800/s3740_minimum_distance_between_three_equal_elements_i/readme.md b/src/main/java/g3701_3800/s3740_minimum_distance_between_three_equal_elements_i/readme.md
new file mode 100644
index 000000000..28e3b80ac
--- /dev/null
+++ b/src/main/java/g3701_3800/s3740_minimum_distance_between_three_equal_elements_i/readme.md
@@ -0,0 +1,50 @@
+3740\. Minimum Distance Between Three Equal Elements I
+
+Easy
+
+You are given an integer array `nums`.
+
+A tuple `(i, j, k)` of 3 **distinct** indices is **good** if `nums[i] == nums[j] == nums[k]`.
+
+The **distance** of a **good** tuple is `abs(i - j) + abs(j - k) + abs(k - i)`, where `abs(x)` denotes the **absolute value** of `x`.
+
+Return an integer denoting the **minimum** possible **distance** of a **good** tuple. If no **good** tuples exist, return `-1`.
+
+**Example 1:**
+
+**Input:** nums = [1,2,1,1,3]
+
+**Output:** 6
+
+**Explanation:**
+
+The minimum distance is achieved by the good tuple `(0, 2, 3)`.
+
+`(0, 2, 3)` is a good tuple because `nums[0] == nums[2] == nums[3] == 1`. Its distance is `abs(0 - 2) + abs(2 - 3) + abs(3 - 0) = 2 + 1 + 3 = 6`.
+
+**Example 2:**
+
+**Input:** nums = [1,1,2,3,2,1,2]
+
+**Output:** 8
+
+**Explanation:**
+
+The minimum distance is achieved by the good tuple `(2, 4, 6)`.
+
+`(2, 4, 6)` is a good tuple because `nums[2] == nums[4] == nums[6] == 2`. Its distance is `abs(2 - 4) + abs(4 - 6) + abs(6 - 2) = 2 + 2 + 4 = 8`.
+
+**Example 3:**
+
+**Input:** nums = [1]
+
+**Output:** \-1
+
+**Explanation:**
+
+There are no good tuples. Therefore, the answer is -1.
+
+**Constraints:**
+
+* `1 <= n == nums.length <= 100`
+* `1 <= nums[i] <= n`
\ No newline at end of file
diff --git a/src/main/java/g3701_3800/s3741_minimum_distance_between_three_equal_elements_ii/Solution.java b/src/main/java/g3701_3800/s3741_minimum_distance_between_three_equal_elements_ii/Solution.java
new file mode 100644
index 000000000..0140d2aa4
--- /dev/null
+++ b/src/main/java/g3701_3800/s3741_minimum_distance_between_three_equal_elements_ii/Solution.java
@@ -0,0 +1,28 @@
+package g3701_3800.s3741_minimum_distance_between_three_equal_elements_ii;
+
+// #Medium #Array #Hash_Table #Senior #Weekly_Contest_475
+// #2026_04_26_Time_6_ms_(99.60%)_Space_161.24_MB_(96.23%)
+
+public class Solution {
+ public int minimumDistance(int[] nums) {
+ int n = nums.length;
+ int ans = Integer.MAX_VALUE;
+ int[] prev1 = new int[n + 1];
+ int[] prev2 = new int[n + 1];
+ for (int i = 0; i < n + 1; i++) {
+ prev1[i] = prev2[i] = -1;
+ }
+ for (int i = 0; i < n; i++) {
+ int value = nums[i];
+ if (prev2[value] != -1) {
+ ans = Math.min(ans, (i - prev2[value]));
+ }
+ prev2[value] = prev1[value];
+ prev1[value] = i;
+ }
+ if (ans < 100002) {
+ return ans * 2;
+ }
+ return -1;
+ }
+}
diff --git a/src/main/java/g3701_3800/s3741_minimum_distance_between_three_equal_elements_ii/readme.md b/src/main/java/g3701_3800/s3741_minimum_distance_between_three_equal_elements_ii/readme.md
new file mode 100644
index 000000000..d3aee5aa3
--- /dev/null
+++ b/src/main/java/g3701_3800/s3741_minimum_distance_between_three_equal_elements_ii/readme.md
@@ -0,0 +1,50 @@
+3741\. Minimum Distance Between Three Equal Elements II
+
+Medium
+
+You are given an integer array `nums`.
+
+A tuple `(i, j, k)` of 3 **distinct** indices is **good** if `nums[i] == nums[j] == nums[k]`.
+
+The **distance** of a **good** tuple is `abs(i - j) + abs(j - k) + abs(k - i)`, where `abs(x)` denotes the **absolute value** of `x`.
+
+Return an integer denoting the **minimum** possible **distance** of a **good** tuple. If no **good** tuples exist, return `-1`.
+
+**Example 1:**
+
+**Input:** nums = [1,2,1,1,3]
+
+**Output:** 6
+
+**Explanation:**
+
+The minimum distance is achieved by the good tuple `(0, 2, 3)`.
+
+`(0, 2, 3)` is a good tuple because `nums[0] == nums[2] == nums[3] == 1`. Its distance is `abs(0 - 2) + abs(2 - 3) + abs(3 - 0) = 2 + 1 + 3 = 6`.
+
+**Example 2:**
+
+**Input:** nums = [1,1,2,3,2,1,2]
+
+**Output:** 8
+
+**Explanation:**
+
+The minimum distance is achieved by the good tuple `(2, 4, 6)`.
+
+`(2, 4, 6)` is a good tuple because `nums[2] == nums[4] == nums[6] == 2`. Its distance is `abs(2 - 4) + abs(4 - 6) + abs(6 - 2) = 2 + 2 + 4 = 8`.
+
+**Example 3:**
+
+**Input:** nums = [1]
+
+**Output:** \-1
+
+**Explanation:**
+
+There are no good tuples. Therefore, the answer is -1.
+
+**Constraints:**
+
+* 1 <= n == nums.length <= 105
+* `1 <= nums[i] <= n`
\ No newline at end of file
diff --git a/src/main/java/g3701_3800/s3742_maximum_path_score_in_a_grid/Solution.java b/src/main/java/g3701_3800/s3742_maximum_path_score_in_a_grid/Solution.java
new file mode 100644
index 000000000..f13cf823e
--- /dev/null
+++ b/src/main/java/g3701_3800/s3742_maximum_path_score_in_a_grid/Solution.java
@@ -0,0 +1,51 @@
+package g3701_3800.s3742_maximum_path_score_in_a_grid;
+
+// #Medium #Array #Dynamic_Programming #Matrix #Staff #Weekly_Contest_475
+// #2026_04_26_Time_212_ms_(91.38%)_Space_92.93_MB_(35.06%)
+
+public class Solution {
+ public int maxPathScore(int[][] grid, int k) {
+ int n = grid.length;
+ int m = grid[0].length;
+ int mxc = Math.min(k + 1, n + m + 5);
+ int[][][] dp = new int[n][m][mxc];
+ for (int i = 0; i < n; i++) {
+ for (int j = 0; j < m; j++) {
+ for (int c = 0; c < mxc; c++) {
+ dp[i][j][c] = -1;
+ }
+ }
+ }
+ dp[0][0][0] = 0;
+ for (int i = 0; i < n; i++) {
+ for (int j = 0; j < m; j++) {
+ for (int c = 0; c < mxc; c++) {
+ if (dp[i][j][c] == -1) {
+ continue;
+ }
+ // move right
+ if (j + 1 < m) {
+ int cost = c + (grid[i][j + 1] > 0 ? 1 : 0);
+ if (cost < mxc) {
+ dp[i][j + 1][cost] =
+ Math.max(dp[i][j + 1][cost], dp[i][j][c] + grid[i][j + 1]);
+ }
+ }
+ // move down
+ if (i + 1 < n) {
+ int cost = c + (grid[i + 1][j] > 0 ? 1 : 0);
+ if (cost < mxc) {
+ dp[i + 1][j][cost] =
+ Math.max(dp[i + 1][j][cost], dp[i][j][c] + grid[i + 1][j]);
+ }
+ }
+ }
+ }
+ }
+ int ans = -1;
+ for (int c = 0; c < mxc; c++) {
+ ans = Math.max(ans, dp[n - 1][m - 1][c]);
+ }
+ return ans;
+ }
+}
diff --git a/src/main/java/g3701_3800/s3742_maximum_path_score_in_a_grid/readme.md b/src/main/java/g3701_3800/s3742_maximum_path_score_in_a_grid/readme.md
new file mode 100644
index 000000000..4294a424d
--- /dev/null
+++ b/src/main/java/g3701_3800/s3742_maximum_path_score_in_a_grid/readme.md
@@ -0,0 +1,52 @@
+3742\. Maximum Path Score in a Grid
+
+Medium
+
+You are given an `m x n` grid where each cell contains one of the values 0, 1, or 2. You are also given an integer `k`.
+
+You start from the top-left corner `(0, 0)` and want to reach the bottom-right corner `(m - 1, n - 1)` by moving only **right** or **down**.
+
+Each cell contributes a specific score and incurs an associated cost, according to their cell values:
+
+* 0: adds 0 to your score and costs 0.
+* 1: adds 1 to your score and costs 1.
+* 2: adds 2 to your score and costs 1.
+
+Return the **maximum** score achievable without exceeding a total cost of `k`, or -1 if no valid path exists.
+
+**Note:** If you reach the last cell but the total cost exceeds `k`, the path is invalid.
+
+**Example 1:**
+
+**Input:** grid = [[0, 1],[2, 0]], k = 1
+
+**Output:** 2
+
+**Explanation:**
+
+The optimal path is:
+
+| Cell | grid[i][j] | Score | Total Score | Cost | Total Cost |
+|--------|------------|-------|-------------|------|------------|
+| (0, 0) | 0 | 0 | 0 | 0 | 0 |
+| (1, 0) | 2 | 2 | 2 | 1 | 1 |
+| (1, 1) | 0 | 0 | 2 | 0 | 1 |
+
+Thus, the maximum possible score is 2.
+
+**Example 2:**
+
+**Input:** grid = [[0, 1],[1, 2]], k = 1
+
+**Output:** \-1
+
+**Explanation:**
+
+There is no path that reaches cell `(1, 1)` without exceeding cost k. Thus, the answer is -1.
+
+**Constraints:**
+
+* `1 <= m, n <= 200`
+* 0 <= k <= 103
+* `grid[0][0] == 0`
+* `0 <= grid[i][j] <= 2`
diff --git a/src/main/java/g3701_3800/s3743_maximize_cyclic_partition_score/Solution.java b/src/main/java/g3701_3800/s3743_maximize_cyclic_partition_score/Solution.java
new file mode 100644
index 000000000..6157b2620
--- /dev/null
+++ b/src/main/java/g3701_3800/s3743_maximize_cyclic_partition_score/Solution.java
@@ -0,0 +1,67 @@
+package g3701_3800.s3743_maximize_cyclic_partition_score;
+
+// #Hard #Array #Dynamic_Programming #Weekly_Contest_475 #Principal
+// #2026_04_26_Time_40_ms_(96.15%)_Space_120.45_MB_(7.69%)
+
+public class Solution {
+ public long maximumScore(int[] nums, int k) {
+ // Find index of minimum element
+ int j = 0;
+ for (int i = 0; i < nums.length; i++) {
+ if (nums[i] < nums[j]) {
+ j = i;
+ }
+ }
+ // Build array 'a'
+ int n = nums.length;
+ int[] a = new int[n];
+ for (int i = 0; i < n; i++) {
+ a[i] = nums[(j + i) % n];
+ }
+ // Build array 'b' (rotated and reversed)
+ int[] b = new int[n];
+ for (int i = 0; i < n; i++) {
+ b[i] = nums[(j + 1 + i) % n];
+ }
+ reverse(b);
+ // Compute and return max of f(a, k) and f(b, k)
+ return Math.max(f(a, k), f(b, k));
+ }
+
+ private long f(int[] a, int k) {
+ int n = a.length;
+ long[][] dp = new long[k + 1][n + 1];
+ long mn = Long.MAX_VALUE;
+ long mx = Long.MIN_VALUE;
+ // Initialize dp[1][j+1]
+ for (int j = 0; j < n; j++) {
+ mn = Math.min(mn, a[j]);
+ mx = Math.max(mx, a[j]);
+ dp[1][j + 1] = mx - mn;
+ }
+ long res = dp[1][n];
+ for (int i = 2; i <= k; i++) {
+ long x = Long.MIN_VALUE;
+ long y = Long.MIN_VALUE;
+ for (int j = i - 1; j < n; j++) {
+ x = Math.max(x, dp[i - 1][j] - a[j]);
+ y = Math.max(y, dp[i - 1][j] + a[j]);
+ dp[i][j + 1] = Math.max(dp[i][j], Math.max(x + a[j], y - a[j]));
+ }
+ res = Math.max(res, dp[i][n]);
+ }
+ return res;
+ }
+
+ private void reverse(int[] arr) {
+ int left = 0;
+ int right = arr.length - 1;
+ while (left < right) {
+ int temp = arr[left];
+ arr[left] = arr[right];
+ arr[right] = temp;
+ left++;
+ right--;
+ }
+ }
+}
diff --git a/src/main/java/g3701_3800/s3743_maximize_cyclic_partition_score/readme.md b/src/main/java/g3701_3800/s3743_maximize_cyclic_partition_score/readme.md
new file mode 100644
index 000000000..56f6640a3
--- /dev/null
+++ b/src/main/java/g3701_3800/s3743_maximize_cyclic_partition_score/readme.md
@@ -0,0 +1,52 @@
+3743\. Maximize Cyclic Partition Score
+
+Hard
+
+You are given a **cyclic** array `nums` and an integer `k`.
+
+**Partition** `nums` into **at most** `k` non-empty subarrays. As `nums` is cyclic, these subarrays may wrap around from the end of the array back to the beginning.
+
+The **range** of a subarray is the difference between its **maximum** and **minimum** values. The **score** of a partition is the sum of subarray **ranges**.
+
+Return the **maximum** possible **score** among all cyclic partitions.
+
+**Example 1:**
+
+**Input:** nums = [1,2,3,3], k = 2
+
+**Output:** 3
+
+**Explanation:**
+
+* Partition `nums` into `[2, 3]` and `[3, 1]` (wrapped around).
+* The range of `[2, 3]` is `max(2, 3) - min(2, 3) = 3 - 2 = 1`.
+* The range of `[3, 1]` is `max(3, 1) - min(3, 1) = 3 - 1 = 2`.
+* The score is `1 + 2 = 3`.
+
+**Example 2:**
+
+**Input:** nums = [1,2,3,3], k = 1
+
+**Output:** 2
+
+**Explanation:**
+
+* Partition `nums` into `[1, 2, 3, 3]`.
+* The range of `[1, 2, 3, 3]` is `max(1, 2, 3, 3) - min(1, 2, 3, 3) = 3 - 1 = 2`.
+* The score is 2.
+
+**Example 3:**
+
+**Input:** nums = [1,2,3,3], k = 4
+
+**Output:** 3
+
+**Explanation:**
+
+Identical to Example 1, we partition `nums` into `[2, 3]` and `[3, 1]`. Note that `nums` may be partitioned into fewer than `k` subarrays.
+
+**Constraints:**
+
+* `1 <= nums.length <= 1000`
+* 1 <= nums[i] <= 109
+* `1 <= k <= nums.length`
\ No newline at end of file
diff --git a/src/main/java/g3701_3800/s3745_maximize_expression_of_three_elements/Solution.java b/src/main/java/g3701_3800/s3745_maximize_expression_of_three_elements/Solution.java
new file mode 100644
index 000000000..854c4c2d6
--- /dev/null
+++ b/src/main/java/g3701_3800/s3745_maximize_expression_of_three_elements/Solution.java
@@ -0,0 +1,24 @@
+package g3701_3800.s3745_maximize_expression_of_three_elements;
+
+// #Easy #Array #Sorting #Greedy #Enumeration #Mid_Level #Weekly_Contest_476
+// #2026_04_26_Time_1_ms_(99.84%)_Space_45.12_MB_(68.56%)
+
+public class Solution {
+ public int maximizeExpressionOfThree(int[] nums) {
+ int max1 = Integer.MIN_VALUE;
+ int max2 = Integer.MIN_VALUE;
+ int min = Integer.MAX_VALUE;
+ for (int num : nums) {
+ if (num > max1) {
+ max2 = max1;
+ max1 = num;
+ } else if (num > max2) {
+ max2 = num;
+ }
+ if (num < min) {
+ min = num;
+ }
+ }
+ return max1 + max2 - min;
+ }
+}
diff --git a/src/main/java/g3701_3800/s3745_maximize_expression_of_three_elements/readme.md b/src/main/java/g3701_3800/s3745_maximize_expression_of_three_elements/readme.md
new file mode 100644
index 000000000..8b7d60816
--- /dev/null
+++ b/src/main/java/g3701_3800/s3745_maximize_expression_of_three_elements/readme.md
@@ -0,0 +1,34 @@
+3745\. Maximize Expression of Three Elements
+
+Easy
+
+You are given an integer array `nums`.
+
+Choose three elements `a`, `b`, and `c` from `nums` at **distinct** indices such that the value of the expression `a + b - c` is maximized.
+
+Return an integer denoting the **maximum possible value** of this expression.
+
+**Example 1:**
+
+**Input:** nums = [1,4,2,5]
+
+**Output:** 8
+
+**Explanation:**
+
+We can choose `a = 4`, `b = 5`, and `c = 1`. The expression value is `4 + 5 - 1 = 8`, which is the maximum possible.
+
+**Example 2:**
+
+**Input:** nums = [-2,0,5,-2,4]
+
+**Output:** 11
+
+**Explanation:**
+
+We can choose `a = 5`, `b = 4`, and `c = -2`. The expression value is `5 + 4 - (-2) = 11`, which is the maximum possible.
+
+**Constraints:**
+
+* `3 <= nums.length <= 100`
+* `-100 <= nums[i] <= 100`
\ No newline at end of file
diff --git a/src/main/java/g3701_3800/s3746_minimum_string_length_after_balanced_removals/Solution.java b/src/main/java/g3701_3800/s3746_minimum_string_length_after_balanced_removals/Solution.java
new file mode 100644
index 000000000..e6f31ded3
--- /dev/null
+++ b/src/main/java/g3701_3800/s3746_minimum_string_length_after_balanced_removals/Solution.java
@@ -0,0 +1,14 @@
+package g3701_3800.s3746_minimum_string_length_after_balanced_removals;
+
+// #Medium #String #Stack #Counting #Senior #Weekly_Contest_476
+// #2026_04_26_Time_3_ms_(95.94%)_Space_47.34_MB_(25.76%)
+
+public class Solution {
+ public int minLengthAfterRemovals(String s) {
+ int[] hash = new int[2];
+ for (char c : s.toCharArray()) {
+ hash[c - 'a']++;
+ }
+ return Math.abs(hash[0] - hash[1]);
+ }
+}
diff --git a/src/main/java/g3701_3800/s3746_minimum_string_length_after_balanced_removals/readme.md b/src/main/java/g3701_3800/s3746_minimum_string_length_after_balanced_removals/readme.md
new file mode 100644
index 000000000..d97662b43
--- /dev/null
+++ b/src/main/java/g3701_3800/s3746_minimum_string_length_after_balanced_removals/readme.md
@@ -0,0 +1,44 @@
+3746\. Minimum String Length After Balanced Removals
+
+Medium
+
+You are given a string `s` consisting only of the characters `'a'` and `'b'`.
+
+You are allowed to repeatedly remove **any substring** where the number of `'a'` characters is equal to the number of `'b'` characters. After each removal, the remaining parts of the string are concatenated together without gaps.
+
+Return an integer denoting the **minimum possible length** of the string after performing any number of such operations.
+
+**Example 1:**
+
+**Input:** s = `"aabbab"`
+
+**Output:** 0
+
+**Explanation:**
+
+The substring `"aabbab"` has three `'a'` and three `'b'`. Since their counts are equal, we can remove the entire string directly. The minimum length is 0.
+
+**Example 2:**
+
+**Input:** s = `"aaaa"`
+
+**Output:** 4
+
+**Explanation:**
+
+Every substring of `"aaaa"` contains only `'a'` characters. No substring can be removed as a result, so the minimum length remains 4.
+
+**Example 3:**
+
+**Input:** s = `"aaabb"`
+
+**Output:** 1
+
+**Explanation:**
+
+First, remove the substring `"ab"`, leaving `"aab"`. Next, remove the new substring `"ab"`, leaving `"a"`. No further removals are possible, so the minimum length is 1.
+
+**Constraints:**
+
+* 1 <= s.length <= 105
+* `s[i]` is either `'a'` or `'b'`.
\ No newline at end of file
diff --git a/src/main/java/g3701_3800/s3747_count_distinct_integers_after_removing_zeros/Solution.java b/src/main/java/g3701_3800/s3747_count_distinct_integers_after_removing_zeros/Solution.java
new file mode 100644
index 000000000..244b4c74c
--- /dev/null
+++ b/src/main/java/g3701_3800/s3747_count_distinct_integers_after_removing_zeros/Solution.java
@@ -0,0 +1,28 @@
+package g3701_3800.s3747_count_distinct_integers_after_removing_zeros;
+
+// #Medium #Dynamic_Programming #Math #Staff #Weekly_Contest_476
+// #2026_04_26_Time_1_ms_(100.00%)_Space_42.72_MB_(79.66%)
+
+public class Solution {
+ public long countDistinct(long n) {
+ String digits = Long.toString(n);
+ int m = digits.length();
+ long[] power9 = new long[m + 1];
+ power9[0] = 1;
+ for (int i = 1; i <= m; i++) {
+ power9[i] = power9[i - 1] * 9;
+ }
+ long total = 0;
+ for (int length = 1; length < m; length++) {
+ total += power9[length];
+ }
+ for (int idx = 0; idx < m; idx++) {
+ int d = digits.charAt(idx) - '0';
+ if (d == 0) {
+ return total;
+ }
+ total += (d - 1) * power9[m - idx - 1];
+ }
+ return total + 1;
+ }
+}
diff --git a/src/main/java/g3701_3800/s3747_count_distinct_integers_after_removing_zeros/readme.md b/src/main/java/g3701_3800/s3747_count_distinct_integers_after_removing_zeros/readme.md
new file mode 100644
index 000000000..fc8394dc5
--- /dev/null
+++ b/src/main/java/g3701_3800/s3747_count_distinct_integers_after_removing_zeros/readme.md
@@ -0,0 +1,33 @@
+3747\. Count Distinct Integers After Removing Zeros
+
+Medium
+
+You are given a **positive** integer `n`.
+
+For every integer `x` from 1 to `n`, we write down the integer obtained by removing all zeros from the decimal representation of `x`.
+
+Return an integer denoting the number of **distinct** integers written down.
+
+**Example 1:**
+
+**Input:** n = 10
+
+**Output:** 9
+
+**Explanation:**
+
+The integers we wrote down are 1, 2, 3, 4, 5, 6, 7, 8, 9, 1. There are 9 distinct integers (1, 2, 3, 4, 5, 6, 7, 8, 9).
+
+**Example 2:**
+
+**Input:** n = 3
+
+**Output:** 3
+
+**Explanation:**
+
+The integers we wrote down are 1, 2, 3. There are 3 distinct integers (1, 2, 3).
+
+**Constraints:**
+
+* 1 <= n <= 1015
\ No newline at end of file
diff --git a/src/test/java/g3701_3800/s3737_count_subarrays_with_majority_element_i/SolutionTest.java b/src/test/java/g3701_3800/s3737_count_subarrays_with_majority_element_i/SolutionTest.java
new file mode 100644
index 000000000..715d376f4
--- /dev/null
+++ b/src/test/java/g3701_3800/s3737_count_subarrays_with_majority_element_i/SolutionTest.java
@@ -0,0 +1,23 @@
+package g3701_3800.s3737_count_subarrays_with_majority_element_i;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import org.junit.jupiter.api.Test;
+
+class SolutionTest {
+ @Test
+ void countMajoritySubarrays() {
+ assertThat(new Solution().countMajoritySubarrays(new int[] {1, 1, 2}, 1), equalTo(4));
+ }
+
+ @Test
+ void countMajoritySubarrays2() {
+ assertThat(new Solution().countMajoritySubarrays(new int[] {2, 2}, 1), equalTo(0));
+ }
+
+ @Test
+ void countMajoritySubarrays3() {
+ assertThat(new Solution().countMajoritySubarrays(new int[] {1, 2, 1, 2}, 1), equalTo(3));
+ }
+}
diff --git a/src/test/java/g3701_3800/s3738_longest_non_decreasing_subarray_after_replacing_at_most_one_element/SolutionTest.java b/src/test/java/g3701_3800/s3738_longest_non_decreasing_subarray_after_replacing_at_most_one_element/SolutionTest.java
new file mode 100644
index 000000000..f93e28135
--- /dev/null
+++ b/src/test/java/g3701_3800/s3738_longest_non_decreasing_subarray_after_replacing_at_most_one_element/SolutionTest.java
@@ -0,0 +1,28 @@
+package g3701_3800.s3738_longest_non_decreasing_subarray_after_replacing_at_most_one_element;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import org.junit.jupiter.api.Test;
+
+class SolutionTest {
+ @Test
+ void longestSubarray() {
+ assertThat(new Solution().longestSubarray(new int[] {1, 2, 3}), equalTo(3));
+ }
+
+ @Test
+ void longestSubarray2() {
+ assertThat(new Solution().longestSubarray(new int[] {3, 2, 1}), equalTo(2));
+ }
+
+ @Test
+ void longestSubarray3() {
+ assertThat(new Solution().longestSubarray(new int[] {1, 5, 3, 4, 6}), equalTo(5));
+ }
+
+ @Test
+ void longestSubarray4() {
+ assertThat(new Solution().longestSubarray(new int[] {1, 5}), equalTo(2));
+ }
+}
diff --git a/src/test/java/g3701_3800/s3739_count_subarrays_with_majority_element_ii/SolutionTest.java b/src/test/java/g3701_3800/s3739_count_subarrays_with_majority_element_ii/SolutionTest.java
new file mode 100644
index 000000000..d2150cb30
--- /dev/null
+++ b/src/test/java/g3701_3800/s3739_count_subarrays_with_majority_element_ii/SolutionTest.java
@@ -0,0 +1,23 @@
+package g3701_3800.s3739_count_subarrays_with_majority_element_ii;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import org.junit.jupiter.api.Test;
+
+class SolutionTest {
+ @Test
+ void countMajoritySubarrays() {
+ assertThat(new Solution().countMajoritySubarrays(new int[] {1, 1, 2}, 1), equalTo(4L));
+ }
+
+ @Test
+ void countMajoritySubarrays2() {
+ assertThat(new Solution().countMajoritySubarrays(new int[] {2, 2}, 1), equalTo(0L));
+ }
+
+ @Test
+ void countMajoritySubarrays3() {
+ assertThat(new Solution().countMajoritySubarrays(new int[] {1, 2, 1, 2}, 1), equalTo(3L));
+ }
+}
diff --git a/src/test/java/g3701_3800/s3740_minimum_distance_between_three_equal_elements_i/SolutionTest.java b/src/test/java/g3701_3800/s3740_minimum_distance_between_three_equal_elements_i/SolutionTest.java
new file mode 100644
index 000000000..b37a726aa
--- /dev/null
+++ b/src/test/java/g3701_3800/s3740_minimum_distance_between_three_equal_elements_i/SolutionTest.java
@@ -0,0 +1,23 @@
+package g3701_3800.s3740_minimum_distance_between_three_equal_elements_i;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import org.junit.jupiter.api.Test;
+
+class SolutionTest {
+ @Test
+ void minimumDistance() {
+ assertThat(new Solution().minimumDistance(new int[] {1, 1, 1}), equalTo(4));
+ }
+
+ @Test
+ void minimumDistance2() {
+ assertThat(new Solution().minimumDistance(new int[] {1, 2, 3, 1, 2, 3}), equalTo(-1));
+ }
+
+ @Test
+ void minimumDistance3() {
+ assertThat(new Solution().minimumDistance(new int[] {1, 2, 1, 2, 1}), equalTo(8));
+ }
+}
diff --git a/src/test/java/g3701_3800/s3741_minimum_distance_between_three_equal_elements_ii/SolutionTest.java b/src/test/java/g3701_3800/s3741_minimum_distance_between_three_equal_elements_ii/SolutionTest.java
new file mode 100644
index 000000000..698fa427d
--- /dev/null
+++ b/src/test/java/g3701_3800/s3741_minimum_distance_between_three_equal_elements_ii/SolutionTest.java
@@ -0,0 +1,23 @@
+package g3701_3800.s3741_minimum_distance_between_three_equal_elements_ii;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import org.junit.jupiter.api.Test;
+
+class SolutionTest {
+ @Test
+ void minimumDistance() {
+ assertThat(new Solution().minimumDistance(new int[] {1, 1, 1}), equalTo(4));
+ }
+
+ @Test
+ void minimumDistance2() {
+ assertThat(new Solution().minimumDistance(new int[] {1, 2, 3, 1, 2, 3}), equalTo(-1));
+ }
+
+ @Test
+ void minimumDistance3() {
+ assertThat(new Solution().minimumDistance(new int[] {1, 2, 1, 2, 1}), equalTo(8));
+ }
+}
diff --git a/src/test/java/g3701_3800/s3742_maximum_path_score_in_a_grid/SolutionTest.java b/src/test/java/g3701_3800/s3742_maximum_path_score_in_a_grid/SolutionTest.java
new file mode 100644
index 000000000..1647dc91c
--- /dev/null
+++ b/src/test/java/g3701_3800/s3742_maximum_path_score_in_a_grid/SolutionTest.java
@@ -0,0 +1,23 @@
+package g3701_3800.s3742_maximum_path_score_in_a_grid;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import org.junit.jupiter.api.Test;
+
+class SolutionTest {
+ @Test
+ void maxPathScore() {
+ assertThat(new Solution().maxPathScore(new int[][] {{0, 1}, {2, 3}}, 1), equalTo(-1));
+ }
+
+ @Test
+ void maxPathScore2() {
+ assertThat(new Solution().maxPathScore(new int[][] {{0, 1}, {2, 3}}, 2), equalTo(5));
+ }
+
+ @Test
+ void maxPathScore3() {
+ assertThat(new Solution().maxPathScore(new int[][] {{-1, -2}, {-3, -4}}, 0), equalTo(-1));
+ }
+}
diff --git a/src/test/java/g3701_3800/s3743_maximize_cyclic_partition_score/SolutionTest.java b/src/test/java/g3701_3800/s3743_maximize_cyclic_partition_score/SolutionTest.java
new file mode 100644
index 000000000..37f54fb21
--- /dev/null
+++ b/src/test/java/g3701_3800/s3743_maximize_cyclic_partition_score/SolutionTest.java
@@ -0,0 +1,23 @@
+package g3701_3800.s3743_maximize_cyclic_partition_score;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import org.junit.jupiter.api.Test;
+
+class SolutionTest {
+ @Test
+ void maximumScore() {
+ assertThat(new Solution().maximumScore(new int[] {5, 5, 5}, 2), equalTo(0L));
+ }
+
+ @Test
+ void maximumScore2() {
+ assertThat(new Solution().maximumScore(new int[] {1, 3, 2}, 1), equalTo(2L));
+ }
+
+ @Test
+ void maximumScore3() {
+ assertThat(new Solution().maximumScore(new int[] {1, 4, 2}, 2), equalTo(3L));
+ }
+}
diff --git a/src/test/java/g3701_3800/s3745_maximize_expression_of_three_elements/SolutionTest.java b/src/test/java/g3701_3800/s3745_maximize_expression_of_three_elements/SolutionTest.java
new file mode 100644
index 000000000..3dfc57688
--- /dev/null
+++ b/src/test/java/g3701_3800/s3745_maximize_expression_of_three_elements/SolutionTest.java
@@ -0,0 +1,23 @@
+package g3701_3800.s3745_maximize_expression_of_three_elements;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import org.junit.jupiter.api.Test;
+
+class SolutionTest {
+ @Test
+ void maximizeExpressionOfThree() {
+ assertThat(new Solution().maximizeExpressionOfThree(new int[] {1, 2, 3}), equalTo(4));
+ }
+
+ @Test
+ void maximizeExpressionOfThree2() {
+ assertThat(new Solution().maximizeExpressionOfThree(new int[] {5, 5, 5}), equalTo(5));
+ }
+
+ @Test
+ void maximizeExpressionOfThree3() {
+ assertThat(new Solution().maximizeExpressionOfThree(new int[] {-5, -1, -3, 4}), equalTo(8));
+ }
+}
diff --git a/src/test/java/g3701_3800/s3746_minimum_string_length_after_balanced_removals/SolutionTest.java b/src/test/java/g3701_3800/s3746_minimum_string_length_after_balanced_removals/SolutionTest.java
new file mode 100644
index 000000000..057a9b553
--- /dev/null
+++ b/src/test/java/g3701_3800/s3746_minimum_string_length_after_balanced_removals/SolutionTest.java
@@ -0,0 +1,23 @@
+package g3701_3800.s3746_minimum_string_length_after_balanced_removals;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import org.junit.jupiter.api.Test;
+
+class SolutionTest {
+ @Test
+ void minLengthAfterRemovals() {
+ assertThat(new Solution().minLengthAfterRemovals("ab"), equalTo(0));
+ }
+
+ @Test
+ void minLengthAfterRemovals2() {
+ assertThat(new Solution().minLengthAfterRemovals("aaab"), equalTo(2));
+ }
+
+ @Test
+ void minLengthAfterRemovals3() {
+ assertThat(new Solution().minLengthAfterRemovals("bbbb"), equalTo(4));
+ }
+}
diff --git a/src/test/java/g3701_3800/s3747_count_distinct_integers_after_removing_zeros/SolutionTest.java b/src/test/java/g3701_3800/s3747_count_distinct_integers_after_removing_zeros/SolutionTest.java
new file mode 100644
index 000000000..e4e91a351
--- /dev/null
+++ b/src/test/java/g3701_3800/s3747_count_distinct_integers_after_removing_zeros/SolutionTest.java
@@ -0,0 +1,23 @@
+package g3701_3800.s3747_count_distinct_integers_after_removing_zeros;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import org.junit.jupiter.api.Test;
+
+class SolutionTest {
+ @Test
+ void countDistinct() {
+ assertThat(new Solution().countDistinct(9L), equalTo(9L));
+ }
+
+ @Test
+ void countDistinct2() {
+ assertThat(new Solution().countDistinct(20L), equalTo(18L));
+ }
+
+ @Test
+ void countDistinct3() {
+ assertThat(new Solution().countDistinct(99L), equalTo(90L));
+ }
+}