From d1c700173c7b43d56bedd99c688b5adba2e40cbd Mon Sep 17 00:00:00 2001 From: Valentyn Kolesnikov Date: Mon, 6 Oct 2025 15:00:21 +0300 Subject: [PATCH 1/3] Added tasks 3701-3704 --- .../s3701_compute_alternating_sum/Solution.kt | 18 +++++ .../s3701_compute_alternating_sum/readme.md | 38 ++++++++++ .../Solution.kt | 20 ++++++ .../readme.md | 32 +++++++++ .../Solution.kt | 38 ++++++++++ .../readme.md | 70 +++++++++++++++++++ .../Solution.kt | 61 ++++++++++++++++ .../readme.md | 46 ++++++++++++ .../SolutionTest.kt | 20 ++++++ .../SolutionTest.kt | 23 ++++++ .../SolutionTest.kt | 25 +++++++ .../SolutionTest.kt | 22 ++++++ 12 files changed, 413 insertions(+) create mode 100644 src/main/kotlin/g3701_3800/s3701_compute_alternating_sum/Solution.kt create mode 100644 src/main/kotlin/g3701_3800/s3701_compute_alternating_sum/readme.md create mode 100644 src/main/kotlin/g3701_3800/s3702_longest_subsequence_with_non_zero_bitwise_xor/Solution.kt create mode 100644 src/main/kotlin/g3701_3800/s3702_longest_subsequence_with_non_zero_bitwise_xor/readme.md create mode 100644 src/main/kotlin/g3701_3800/s3703_remove_k_balanced_substrings/Solution.kt create mode 100644 src/main/kotlin/g3701_3800/s3703_remove_k_balanced_substrings/readme.md create mode 100644 src/main/kotlin/g3701_3800/s3704_count_no_zero_pairs_that_sum_to_n/Solution.kt create mode 100644 src/main/kotlin/g3701_3800/s3704_count_no_zero_pairs_that_sum_to_n/readme.md create mode 100644 src/test/kotlin/g3701_3800/s3701_compute_alternating_sum/SolutionTest.kt create mode 100644 src/test/kotlin/g3701_3800/s3702_longest_subsequence_with_non_zero_bitwise_xor/SolutionTest.kt create mode 100644 src/test/kotlin/g3701_3800/s3703_remove_k_balanced_substrings/SolutionTest.kt create mode 100644 src/test/kotlin/g3701_3800/s3704_count_no_zero_pairs_that_sum_to_n/SolutionTest.kt diff --git a/src/main/kotlin/g3701_3800/s3701_compute_alternating_sum/Solution.kt b/src/main/kotlin/g3701_3800/s3701_compute_alternating_sum/Solution.kt new file mode 100644 index 00000000..fd94a958 --- /dev/null +++ b/src/main/kotlin/g3701_3800/s3701_compute_alternating_sum/Solution.kt @@ -0,0 +1,18 @@ +package g3701_3800.s3701_compute_alternating_sum + +// #Easy #Weekly_Contest_470 #2025_10_06_Time_1_ms_(100.00%)_Space_47.16_MB_(11.11%) + +class Solution { + fun alternatingSum(nums: IntArray): Int { + var sum = 0 + for (i in nums.indices) { + val num = nums[i] + if (i % 2 == 0) { + sum += num + } else { + sum -= num + } + } + return sum + } +} diff --git a/src/main/kotlin/g3701_3800/s3701_compute_alternating_sum/readme.md b/src/main/kotlin/g3701_3800/s3701_compute_alternating_sum/readme.md new file mode 100644 index 00000000..7ea6300f --- /dev/null +++ b/src/main/kotlin/g3701_3800/s3701_compute_alternating_sum/readme.md @@ -0,0 +1,38 @@ +3701\. Compute Alternating Sum + +Easy + +You are given an integer array `nums`. + +The **alternating sum** of `nums` is the value obtained by **adding** elements at even indices and **subtracting** elements at odd indices. That is, `nums[0] - nums[1] + nums[2] - nums[3]...` + +Return an integer denoting the alternating sum of `nums`. + +**Example 1:** + +**Input:** nums = [1,3,5,7] + +**Output:** \-4 + +**Explanation:** + +* Elements at even indices are `nums[0] = 1` and `nums[2] = 5` because 0 and 2 are even numbers. +* Elements at odd indices are `nums[1] = 3` and `nums[3] = 7` because 1 and 3 are odd numbers. +* The alternating sum is `nums[0] - nums[1] + nums[2] - nums[3] = 1 - 3 + 5 - 7 = -4`. + +**Example 2:** + +**Input:** nums = [100] + +**Output:** 100 + +**Explanation:** + +* The only element at even indices is `nums[0] = 100` because 0 is an even number. +* There are no elements on odd indices. +* The alternating sum is `nums[0] = 100`. + +**Constraints:** + +* `1 <= nums.length <= 100` +* `1 <= nums[i] <= 100` \ No newline at end of file diff --git a/src/main/kotlin/g3701_3800/s3702_longest_subsequence_with_non_zero_bitwise_xor/Solution.kt b/src/main/kotlin/g3701_3800/s3702_longest_subsequence_with_non_zero_bitwise_xor/Solution.kt new file mode 100644 index 00000000..7fc96c5c --- /dev/null +++ b/src/main/kotlin/g3701_3800/s3702_longest_subsequence_with_non_zero_bitwise_xor/Solution.kt @@ -0,0 +1,20 @@ +package g3701_3800.s3702_longest_subsequence_with_non_zero_bitwise_xor + +// #Medium #Weekly_Contest_470 #2025_10_06_Time_2_ms_(100.00%)_Space_79.41_MB_(83.33%) + +class Solution { + fun longestSubsequence(nums: IntArray): Int { + var xorSum = 0 + var allZero = true + for (num in nums) { + xorSum = xorSum xor num + if (num != 0) { + allZero = false + } + } + if (allZero) { + return 0 + } + return if (xorSum != 0) nums.size else nums.size - 1 + } +} diff --git a/src/main/kotlin/g3701_3800/s3702_longest_subsequence_with_non_zero_bitwise_xor/readme.md b/src/main/kotlin/g3701_3800/s3702_longest_subsequence_with_non_zero_bitwise_xor/readme.md new file mode 100644 index 00000000..a6595fe2 --- /dev/null +++ b/src/main/kotlin/g3701_3800/s3702_longest_subsequence_with_non_zero_bitwise_xor/readme.md @@ -0,0 +1,32 @@ +3702\. Longest Subsequence With Non-Zero Bitwise XOR + +Medium + +You are given an integer array `nums`. + +Return the length of the **longest subsequence** in `nums` whose bitwise **XOR** is **non-zero**. If no such **subsequence** exists, return 0. + +**Example 1:** + +**Input:** nums = [1,2,3] + +**Output:** 2 + +**Explanation:** + +One longest subsequence is `[2, 3]`. The bitwise XOR is computed as `2 XOR 3 = 1`, which is non-zero. + +**Example 2:** + +**Input:** nums = [2,3,4] + +**Output:** 3 + +**Explanation:** + +The longest subsequence is `[2, 3, 4]`. The bitwise XOR is computed as `2 XOR 3 XOR 4 = 5`, which is non-zero. + +**Constraints:** + +* 1 <= nums.length <= 105 +* 0 <= nums[i] <= 109 \ No newline at end of file diff --git a/src/main/kotlin/g3701_3800/s3703_remove_k_balanced_substrings/Solution.kt b/src/main/kotlin/g3701_3800/s3703_remove_k_balanced_substrings/Solution.kt new file mode 100644 index 00000000..659fc0b2 --- /dev/null +++ b/src/main/kotlin/g3701_3800/s3703_remove_k_balanced_substrings/Solution.kt @@ -0,0 +1,38 @@ +package g3701_3800.s3703_remove_k_balanced_substrings + +// #Medium #Weekly_Contest_470 #2025_10_06_Time_58_ms_(100.00%)_Space_51.31_MB_(80.00%) + +class Solution { + fun removeSubstring(s: String, k: Int): String { + val sb = StringBuilder() + var count = 0 + for (ch in s.toCharArray()) { + sb.append(ch) + if (ch == '(') { + count++ + } else { + if (count >= k && sb.length >= 2 * k) { + val len = sb.length + var b = true + for (i in len - 2 * k..**()**)` | `()` | +| 2 | `()` | `**()`**` | Empty | + +Thus, the final string is `""`. + +**Example 2:** + +**Input:** s = "(()(", k = 1 + +**Output:** "((" + +**Explanation:** + +k-balanced substring is `"()"` + +| Step | Current `s` | `k-balanced` | Result `s` | +|------|--------------|----------------------|------------| +| 1 | `(()(` | `(~**()**~)(` | `((` | +| 2 | `((` | - | `((` | + +Thus, the final string is `"(("`. + +**Example 3:** + +**Input:** s = "((()))()()()", k = 3 + +**Output:** "()()()" + +**Explanation:** + +k-balanced substring is `"((()))"` + +| Step | Current `s` | `k-balanced` | Result `s` | +|------|-------------------|----------------------------------|------------| +| 1 | `((()))()()()` | ~~**((()))**~~`()()()` | `()()()` | +| 2 | `()()()` | - | `()()()` | + +Thus, the final string is `"()()()"`. + +**Constraints:** + +* 2 <= s.length <= 105 +* `s` consists only of `'('` and `')'`. +* `1 <= k <= s.length / 2` \ No newline at end of file diff --git a/src/main/kotlin/g3701_3800/s3704_count_no_zero_pairs_that_sum_to_n/Solution.kt b/src/main/kotlin/g3701_3800/s3704_count_no_zero_pairs_that_sum_to_n/Solution.kt new file mode 100644 index 00000000..994eb1c2 --- /dev/null +++ b/src/main/kotlin/g3701_3800/s3704_count_no_zero_pairs_that_sum_to_n/Solution.kt @@ -0,0 +1,61 @@ +package g3701_3800.s3704_count_no_zero_pairs_that_sum_to_n + +// #Hard #Weekly_Contest_470 #2025_10_06_Time_11_ms_(100.00%)_Space_42.73_MB_(100.00%) + +class Solution { + fun countNoZeroPairs(n: Long): Long { + var m = 0 + var base: Long = 1 + while (base <= n) { + m++ + base = base * 10 + } + val digits = IntArray(m) + var c = n + for (i in 0.. 0) { + if (num % 10 == 0L) { + return false + } + num = num / 10 + } + return true + } +} diff --git a/src/main/kotlin/g3701_3800/s3704_count_no_zero_pairs_that_sum_to_n/readme.md b/src/main/kotlin/g3701_3800/s3704_count_no_zero_pairs_that_sum_to_n/readme.md new file mode 100644 index 00000000..cfc07dfa --- /dev/null +++ b/src/main/kotlin/g3701_3800/s3704_count_no_zero_pairs_that_sum_to_n/readme.md @@ -0,0 +1,46 @@ +3704\. Count No-Zero Pairs That Sum to N + +Hard + +A **no-zero** integer is a **positive** integer that **does not contain the digit** 0 in its decimal representation. + +Given an integer `n`, count the number of pairs `(a, b)` where: + +* `a` and `b` are **no-zero** integers. +* `a + b = n` + +Return an integer denoting the number of such pairs. + +**Example 1:** + +**Input:** n = 2 + +**Output:** 1 + +**Explanation:** + +The only pair is `(1, 1)`. + +**Example 2:** + +**Input:** n = 3 + +**Output:** 2 + +**Explanation:** + +The pairs are `(1, 2)` and `(2, 1)`. + +**Example 3:** + +**Input:** n = 11 + +**Output:** 8 + +**Explanation:** + +The pairs are `(2, 9)`, `(3, 8)`, `(4, 7)`, `(5, 6)`, `(6, 5)`, `(7, 4)`, `(8, 3)`, and `(9, 2)`. Note that `(1, 10)` and `(10, 1)` do not satisfy the conditions because 10 contains 0 in its decimal representation. + +**Constraints:** + +* 2 <= n <= 1015 \ No newline at end of file diff --git a/src/test/kotlin/g3701_3800/s3701_compute_alternating_sum/SolutionTest.kt b/src/test/kotlin/g3701_3800/s3701_compute_alternating_sum/SolutionTest.kt new file mode 100644 index 00000000..9cc927fb --- /dev/null +++ b/src/test/kotlin/g3701_3800/s3701_compute_alternating_sum/SolutionTest.kt @@ -0,0 +1,20 @@ +package g3701_3800.s3701_compute_alternating_sum + +import org.hamcrest.CoreMatchers.equalTo +import org.hamcrest.MatcherAssert.assertThat +import org.junit.jupiter.api.Test + +internal class SolutionTest { + @Test + fun alternatingSum() { + assertThat( + Solution().alternatingSum(intArrayOf(1, 3, 5, 7)), + equalTo(-4), + ) + } + + @Test + fun alternatingSum2() { + assertThat(Solution().alternatingSum(intArrayOf(100)), equalTo(100)) + } +} diff --git a/src/test/kotlin/g3701_3800/s3702_longest_subsequence_with_non_zero_bitwise_xor/SolutionTest.kt b/src/test/kotlin/g3701_3800/s3702_longest_subsequence_with_non_zero_bitwise_xor/SolutionTest.kt new file mode 100644 index 00000000..55c8ab51 --- /dev/null +++ b/src/test/kotlin/g3701_3800/s3702_longest_subsequence_with_non_zero_bitwise_xor/SolutionTest.kt @@ -0,0 +1,23 @@ +package g3701_3800.s3702_longest_subsequence_with_non_zero_bitwise_xor + +import org.hamcrest.CoreMatchers.equalTo +import org.hamcrest.MatcherAssert.assertThat +import org.junit.jupiter.api.Test + +internal class SolutionTest { + @Test + fun longestSubsequence() { + assertThat( + Solution().longestSubsequence(intArrayOf(1, 2, 3)), + equalTo(2), + ) + } + + @Test + fun longestSubsequence2() { + assertThat( + Solution().longestSubsequence(intArrayOf(2, 3, 4)), + equalTo(3), + ) + } +} diff --git a/src/test/kotlin/g3701_3800/s3703_remove_k_balanced_substrings/SolutionTest.kt b/src/test/kotlin/g3701_3800/s3703_remove_k_balanced_substrings/SolutionTest.kt new file mode 100644 index 00000000..79610d35 --- /dev/null +++ b/src/test/kotlin/g3701_3800/s3703_remove_k_balanced_substrings/SolutionTest.kt @@ -0,0 +1,25 @@ +package g3701_3800.s3703_remove_k_balanced_substrings + +import org.hamcrest.CoreMatchers.equalTo +import org.hamcrest.MatcherAssert.assertThat +import org.junit.jupiter.api.Test + +internal class SolutionTest { + @Test + fun removeSubstring() { + assertThat(Solution().removeSubstring("(())", 1), equalTo("")) + } + + @Test + fun removeSubstring2() { + assertThat(Solution().removeSubstring("(()(", 1), equalTo("((")) + } + + @Test + fun removeSubstring3() { + assertThat( + Solution().removeSubstring("((()))()()()", 3), + equalTo("()()()"), + ) + } +} diff --git a/src/test/kotlin/g3701_3800/s3704_count_no_zero_pairs_that_sum_to_n/SolutionTest.kt b/src/test/kotlin/g3701_3800/s3704_count_no_zero_pairs_that_sum_to_n/SolutionTest.kt new file mode 100644 index 00000000..9e08a347 --- /dev/null +++ b/src/test/kotlin/g3701_3800/s3704_count_no_zero_pairs_that_sum_to_n/SolutionTest.kt @@ -0,0 +1,22 @@ +package g3701_3800.s3704_count_no_zero_pairs_that_sum_to_n + +import org.hamcrest.CoreMatchers.equalTo +import org.hamcrest.MatcherAssert.assertThat +import org.junit.jupiter.api.Test + +internal class SolutionTest { + @Test + fun countNoZeroPairs() { + assertThat(Solution().countNoZeroPairs(2L), equalTo(1L)) + } + + @Test + fun countNoZeroPairs2() { + assertThat(Solution().countNoZeroPairs(3L), equalTo(2L)) + } + + @Test + fun countNoZeroPairs3() { + assertThat(Solution().countNoZeroPairs(11L), equalTo(8L)) + } +} From ff8d448093bfa4360a5e30e570184f055b0a8f4f Mon Sep 17 00:00:00 2001 From: Valentyn Kolesnikov Date: Mon, 6 Oct 2025 17:52:39 +0300 Subject: [PATCH 2/3] Fixed sonar --- .../g3701_3800/s3703_remove_k_balanced_substrings/Solution.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/g3701_3800/s3703_remove_k_balanced_substrings/Solution.kt b/src/main/kotlin/g3701_3800/s3703_remove_k_balanced_substrings/Solution.kt index 659fc0b2..3e6f7de5 100644 --- a/src/main/kotlin/g3701_3800/s3703_remove_k_balanced_substrings/Solution.kt +++ b/src/main/kotlin/g3701_3800/s3703_remove_k_balanced_substrings/Solution.kt @@ -15,13 +15,13 @@ class Solution { val len = sb.length var b = true for (i in len - 2 * k.. Date: Wed, 8 Oct 2025 14:24:22 +0300 Subject: [PATCH 3/3] Updated tags --- .../g3601_3700/s3692_majority_frequency_characters/Solution.kt | 3 ++- .../kotlin/g3601_3700/s3693_climbing_stairs_ii/Solution.kt | 3 ++- .../Solution.kt | 3 ++- .../s3695_maximize_alternating_sum_using_swaps/Solution.kt | 3 ++- .../s3697_compute_decimal_representation/Solution.kt | 2 +- .../s3698_split_array_with_minimum_difference/Solution.kt | 3 ++- .../g3601_3700/s3699_number_of_zigzag_arrays_i/Solution.kt | 3 ++- .../g3601_3700/s3700_number_of_zigzag_arrays_ii/Solution.kt | 3 ++- 8 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/main/kotlin/g3601_3700/s3692_majority_frequency_characters/Solution.kt b/src/main/kotlin/g3601_3700/s3692_majority_frequency_characters/Solution.kt index fabfcf4b..796e51f4 100644 --- a/src/main/kotlin/g3601_3700/s3692_majority_frequency_characters/Solution.kt +++ b/src/main/kotlin/g3601_3700/s3692_majority_frequency_characters/Solution.kt @@ -1,6 +1,7 @@ package g3601_3700.s3692_majority_frequency_characters -// #Easy #Biweekly_Contest_166 #2025_10_03_Time_2_ms_(100.00%)_Space_43.05_MB_(100.00%) +// #Easy #String #Hash_Table #Counting #Biweekly_Contest_166 +// #2025_10_03_Time_2_ms_(100.00%)_Space_43.05_MB_(100.00%) class Solution { fun majorityFrequencyGroup(s: String): String { diff --git a/src/main/kotlin/g3601_3700/s3693_climbing_stairs_ii/Solution.kt b/src/main/kotlin/g3601_3700/s3693_climbing_stairs_ii/Solution.kt index 670b9626..c1b7cc12 100644 --- a/src/main/kotlin/g3601_3700/s3693_climbing_stairs_ii/Solution.kt +++ b/src/main/kotlin/g3601_3700/s3693_climbing_stairs_ii/Solution.kt @@ -1,6 +1,7 @@ package g3601_3700.s3693_climbing_stairs_ii -// #Medium #Biweekly_Contest_166 #2025_10_03_Time_8_ms_(100.00%)_Space_80.61_MB_(12.90%) +// #Medium #Array #Dynamic_Programming #Biweekly_Contest_166 +// #2025_10_03_Time_8_ms_(100.00%)_Space_80.61_MB_(12.90%) import kotlin.math.min diff --git a/src/main/kotlin/g3601_3700/s3694_distinct_points_reachable_after_substring_removal/Solution.kt b/src/main/kotlin/g3601_3700/s3694_distinct_points_reachable_after_substring_removal/Solution.kt index 8cf3aa54..732db3aa 100644 --- a/src/main/kotlin/g3601_3700/s3694_distinct_points_reachable_after_substring_removal/Solution.kt +++ b/src/main/kotlin/g3601_3700/s3694_distinct_points_reachable_after_substring_removal/Solution.kt @@ -1,6 +1,7 @@ package g3601_3700.s3694_distinct_points_reachable_after_substring_removal -// #Medium #Biweekly_Contest_166 #2025_10_03_Time_46_ms_(100.00%)_Space_48.62_MB_(100.00%) +// #Medium #String #Hash_Table #Prefix_Sum #Sliding_Window #Biweekly_Contest_166 +// #2025_10_03_Time_46_ms_(100.00%)_Space_48.62_MB_(100.00%) class Solution { fun distinctPoints(s: String, k: Int): Int { diff --git a/src/main/kotlin/g3601_3700/s3695_maximize_alternating_sum_using_swaps/Solution.kt b/src/main/kotlin/g3601_3700/s3695_maximize_alternating_sum_using_swaps/Solution.kt index c60582af..23e1c83f 100644 --- a/src/main/kotlin/g3601_3700/s3695_maximize_alternating_sum_using_swaps/Solution.kt +++ b/src/main/kotlin/g3601_3700/s3695_maximize_alternating_sum_using_swaps/Solution.kt @@ -1,6 +1,7 @@ package g3601_3700.s3695_maximize_alternating_sum_using_swaps -// #Hard #Biweekly_Contest_166 #2025_10_03_Time_61_ms_(100.00%)_Space_105.29_MB_(100.00%) +// #Hard #Array #Sorting #Greedy #Union_Find #Biweekly_Contest_166 +// #2025_10_03_Time_61_ms_(100.00%)_Space_105.29_MB_(100.00%) class Solution { private lateinit var root: IntArray diff --git a/src/main/kotlin/g3601_3700/s3697_compute_decimal_representation/Solution.kt b/src/main/kotlin/g3601_3700/s3697_compute_decimal_representation/Solution.kt index 39c49871..d076570c 100644 --- a/src/main/kotlin/g3601_3700/s3697_compute_decimal_representation/Solution.kt +++ b/src/main/kotlin/g3601_3700/s3697_compute_decimal_representation/Solution.kt @@ -1,6 +1,6 @@ package g3601_3700.s3697_compute_decimal_representation -// #Easy #Weekly_Contest_469 #2025_10_03_Time_1_ms_(100.00%)_Space_42.64_MB_(100.00%) +// #Easy #Array #Math #Weekly_Contest_469 #2025_10_03_Time_1_ms_(100.00%)_Space_42.64_MB_(100.00%) class Solution { fun decimalRepresentation(n: Int): IntArray { diff --git a/src/main/kotlin/g3601_3700/s3698_split_array_with_minimum_difference/Solution.kt b/src/main/kotlin/g3601_3700/s3698_split_array_with_minimum_difference/Solution.kt index 69ee354a..ff22b35f 100644 --- a/src/main/kotlin/g3601_3700/s3698_split_array_with_minimum_difference/Solution.kt +++ b/src/main/kotlin/g3601_3700/s3698_split_array_with_minimum_difference/Solution.kt @@ -1,6 +1,7 @@ package g3601_3700.s3698_split_array_with_minimum_difference -// #Medium #Weekly_Contest_469 #2025_10_03_Time_3_ms_(100.00%)_Space_69.93_MB_(52.17%) +// #Medium #Array #Prefix_Sum #Weekly_Contest_469 +// #2025_10_03_Time_3_ms_(100.00%)_Space_69.93_MB_(52.17%) import kotlin.math.abs import kotlin.math.min diff --git a/src/main/kotlin/g3601_3700/s3699_number_of_zigzag_arrays_i/Solution.kt b/src/main/kotlin/g3601_3700/s3699_number_of_zigzag_arrays_i/Solution.kt index 500d6601..15c95944 100644 --- a/src/main/kotlin/g3601_3700/s3699_number_of_zigzag_arrays_i/Solution.kt +++ b/src/main/kotlin/g3601_3700/s3699_number_of_zigzag_arrays_i/Solution.kt @@ -1,6 +1,7 @@ package g3601_3700.s3699_number_of_zigzag_arrays_i -// #Hard #Weekly_Contest_469 #2025_10_03_Time_227_ms_(78.57%)_Space_47.61_MB_(42.86%) +// #Hard #Dynamic_Programming #Prefix_Sum #Weekly_Contest_469 +// #2025_10_03_Time_227_ms_(78.57%)_Space_47.61_MB_(42.86%) class Solution { fun zigZagArrays(n: Int, l: Int, r: Int): Int { diff --git a/src/main/kotlin/g3601_3700/s3700_number_of_zigzag_arrays_ii/Solution.kt b/src/main/kotlin/g3601_3700/s3700_number_of_zigzag_arrays_ii/Solution.kt index 33e7bf7f..1af54f6e 100644 --- a/src/main/kotlin/g3601_3700/s3700_number_of_zigzag_arrays_ii/Solution.kt +++ b/src/main/kotlin/g3601_3700/s3700_number_of_zigzag_arrays_ii/Solution.kt @@ -1,6 +1,7 @@ package g3601_3700.s3700_number_of_zigzag_arrays_ii -// #Hard #Weekly_Contest_469 #2025_10_03_Time_175_ms_(100.00%)_Space_49.83_MB_(50.00%) +// #Hard #Dynamic_Programming #Math #Weekly_Contest_469 +// #2025_10_03_Time_175_ms_(100.00%)_Space_49.83_MB_(50.00%) class Solution { fun zigZagArrays(n: Int, l: Int, r: Int): Int {