diff --git a/src/main/java/g2001_2100/s2086_minimum_number_of_buckets_required_to_collect_rainwater_from_houses/readme.md b/src/main/java/g2001_2100/s2086_minimum_number_of_buckets_required_to_collect_rainwater_from_houses/readme.md index 7bf087d94..8eaaf30b7 100644 --- a/src/main/java/g2001_2100/s2086_minimum_number_of_buckets_required_to_collect_rainwater_from_houses/readme.md +++ b/src/main/java/g2001_2100/s2086_minimum_number_of_buckets_required_to_collect_rainwater_from_houses/readme.md @@ -2,7 +2,7 @@ Medium -You are given a **0-index****ed** string `street`. Each character in `street` is either `'H'` representing a house or `'.'` representing an empty space. +You are given a **0-indexed** string `street`. Each character in `street` is either `'H'` representing a house or `'.'` representing an empty space. You can place buckets on the **empty spaces** to collect rainwater that falls from the adjacent houses. The rainwater from a house at index `i` is collected if a bucket is placed at index `i - 1` **and/or** index `i + 1`. A single bucket, if placed adjacent to two houses, can collect the rainwater from **both** houses. diff --git a/src/main/java/g2801_2900/s2862_maximum_element_sum_of_a_complete_subset_of_indices/readme.md b/src/main/java/g2801_2900/s2862_maximum_element_sum_of_a_complete_subset_of_indices/readme.md index ceae0b536..f13c5d4a1 100644 --- a/src/main/java/g2801_2900/s2862_maximum_element_sum_of_a_complete_subset_of_indices/readme.md +++ b/src/main/java/g2801_2900/s2862_maximum_element_sum_of_a_complete_subset_of_indices/readme.md @@ -2,7 +2,7 @@ Hard -You are given a **1****\-indexed** array `nums` of `n` integers. +You are given a **1\-indexed** array `nums` of `n` integers. A set of numbers is **complete** if the product of every pair of its elements is a perfect square. diff --git a/src/main/java/g2801_2900/s2871_split_array_into_maximum_number_of_subarrays/readme.md b/src/main/java/g2801_2900/s2871_split_array_into_maximum_number_of_subarrays/readme.md index 2aa845374..30b80a2b8 100644 --- a/src/main/java/g2801_2900/s2871_split_array_into_maximum_number_of_subarrays/readme.md +++ b/src/main/java/g2801_2900/s2871_split_array_into_maximum_number_of_subarrays/readme.md @@ -8,7 +8,7 @@ We define the score of subarray `nums[l..r]` such that `l <= r` as `nums[l] AND Consider splitting the array into one or more subarrays such that the following conditions are satisfied: -* **E****ach** element of the array belongs to **exactly** one subarray. +* **Each** element of the array belongs to **exactly** one subarray. * The sum of scores of the subarrays is the **minimum** possible. Return _the **maximum** number of subarrays in a split that satisfies the conditions above._ diff --git a/src/main/java/g3501_3600/s3509_maximum_product_of_subsequences_with_an_alternating_sum_equal_to_k/readme.md b/src/main/java/g3501_3600/s3509_maximum_product_of_subsequences_with_an_alternating_sum_equal_to_k/readme.md index 31ec68f81..8b99b69fa 100644 --- a/src/main/java/g3501_3600/s3509_maximum_product_of_subsequences_with_an_alternating_sum_equal_to_k/readme.md +++ b/src/main/java/g3501_3600/s3509_maximum_product_of_subsequences_with_an_alternating_sum_equal_to_k/readme.md @@ -2,7 +2,7 @@ Hard -You are given an integer array `nums` and two integers, `k` and `limit`. Your task is to find a non-empty ****subsequences**** of `nums` that: +You are given an integer array `nums` and two integers, `k` and `limit`. Your task is to find a non-empty **subsequences** of `nums` that: * Has an **alternating sum** equal to `k`. * **Maximizes** the product of all its numbers _without the product exceeding_ `limit`. diff --git a/src/main/java/g3501_3600/s3547_maximum_sum_of_edge_values_in_a_graph/readme.md b/src/main/java/g3501_3600/s3547_maximum_sum_of_edge_values_in_a_graph/readme.md index f182f4a87..9e863ce2f 100644 --- a/src/main/java/g3501_3600/s3547_maximum_sum_of_edge_values_in_a_graph/readme.md +++ b/src/main/java/g3501_3600/s3547_maximum_sum_of_edge_values_in_a_graph/readme.md @@ -2,7 +2,7 @@ Hard -You are given an **und****irected** graph of `n` nodes, numbered from `0` to `n - 1`. Each node is connected to **at most** 2 other nodes. +You are given an **undirected** graph of `n` nodes, numbered from `0` to `n - 1`. Each node is connected to **at most** 2 other nodes. The graph consists of `m` edges, represented by a 2D array `edges`, where edges[i] = [ai, bi] indicates that there is an edge between nodes ai and bi. diff --git a/src/main/java/g3501_3600/s3556_sum_of_largest_prime_substrings/readme.md b/src/main/java/g3501_3600/s3556_sum_of_largest_prime_substrings/readme.md index c719d6374..9c21f6b99 100644 --- a/src/main/java/g3501_3600/s3556_sum_of_largest_prime_substrings/readme.md +++ b/src/main/java/g3501_3600/s3556_sum_of_largest_prime_substrings/readme.md @@ -2,7 +2,7 @@ Medium -Given a string `s`, find the sum of the **3 largest unique prime numbers** that can be formed using any of its ****substring****. +Given a string `s`, find the sum of the **3 largest unique prime numbers** that can be formed using any of its **substring**. Return the **sum** of the three largest unique prime numbers that can be formed. If fewer than three exist, return the sum of **all** available primes. If no prime numbers can be formed, return 0. diff --git a/src/main/java/g3501_3600/s3557_find_maximum_number_of_non_intersecting_substrings/readme.md b/src/main/java/g3501_3600/s3557_find_maximum_number_of_non_intersecting_substrings/readme.md index 6ba4e1b08..d419545af 100644 --- a/src/main/java/g3501_3600/s3557_find_maximum_number_of_non_intersecting_substrings/readme.md +++ b/src/main/java/g3501_3600/s3557_find_maximum_number_of_non_intersecting_substrings/readme.md @@ -4,7 +4,7 @@ Medium You are given a string `word`. -Return the **maximum** number of non-intersecting ****substring**** of word that are at **least** four characters long and start and end with the same letter. +Return the **maximum** number of non-intersecting **substring** of word that are at **least** four characters long and start and end with the same letter. **Example 1:** diff --git a/src/main/java/g3501_3600/s3579_minimum_steps_to_convert_string_with_operations/readme.md b/src/main/java/g3501_3600/s3579_minimum_steps_to_convert_string_with_operations/readme.md index daca34910..d5b602d88 100644 --- a/src/main/java/g3501_3600/s3579_minimum_steps_to_convert_string_with_operations/readme.md +++ b/src/main/java/g3501_3600/s3579_minimum_steps_to_convert_string_with_operations/readme.md @@ -4,7 +4,7 @@ Hard You are given two strings, `word1` and `word2`, of equal length. You need to transform `word1` into `word2`. -For this, divide `word1` into one or more **contiguous **substring****. For each substring `substr` you can perform the following operations: +For this, divide `word1` into one or more **contiguous substring**. For each substring `substr` you can perform the following operations: 1. **Replace:** Replace the character at any one index of `substr` with another lowercase English letter. diff --git a/src/main/java/g3501_3600/s3584_maximum_product_of_first_and_last_elements_of_a_subsequence/readme.md b/src/main/java/g3501_3600/s3584_maximum_product_of_first_and_last_elements_of_a_subsequence/readme.md index 45bcb13ad..00c6f7335 100644 --- a/src/main/java/g3501_3600/s3584_maximum_product_of_first_and_last_elements_of_a_subsequence/readme.md +++ b/src/main/java/g3501_3600/s3584_maximum_product_of_first_and_last_elements_of_a_subsequence/readme.md @@ -4,7 +4,7 @@ Medium You are given an integer array `nums` and an integer `m`. -Return the **maximum** product of the first and last elements of any ****subsequences**** of `nums` of size `m`. +Return the **maximum** product of the first and last elements of any **subsequences** of `nums` of size `m`. **Example 1:** diff --git a/src/main/java/g3501_3600/s3585_find_weighted_median_node_in_tree/readme.md b/src/main/java/g3501_3600/s3585_find_weighted_median_node_in_tree/readme.md index 69a344aa8..f0f50f109 100644 --- a/src/main/java/g3501_3600/s3585_find_weighted_median_node_in_tree/readme.md +++ b/src/main/java/g3501_3600/s3585_find_weighted_median_node_in_tree/readme.md @@ -32,7 +32,7 @@ Return an array `ans`, where `ans[j]` is the node index of the weighted median f **Output:** [1,0,2] -**E****xplanation:** +**Explanation:** ![](https://assets.leetcode.com/uploads/2025/05/26/screenshot-2025-05-26-at-193610.png) diff --git a/src/main/java/g3501_3600/s3599_partition_array_to_minimize_xor/readme.md b/src/main/java/g3501_3600/s3599_partition_array_to_minimize_xor/readme.md index baa25d57f..1970dbd8d 100644 --- a/src/main/java/g3501_3600/s3599_partition_array_to_minimize_xor/readme.md +++ b/src/main/java/g3501_3600/s3599_partition_array_to_minimize_xor/readme.md @@ -4,7 +4,7 @@ Medium You are given an integer array `nums` and an integer `k`. -Your task is to partition `nums` into `k` non-empty ****non-empty subarrays****. For each subarray, compute the bitwise **XOR** of all its elements. +Your task is to partition `nums` into `k` non-empty **non-empty subarrays**. For each subarray, compute the bitwise **XOR** of all its elements. Return the **minimum** possible value of the **maximum XOR** among these `k` subarrays. diff --git a/src/main/java/g3601_3700/s3615_longest_palindromic_path_in_graph/readme.md b/src/main/java/g3601_3700/s3615_longest_palindromic_path_in_graph/readme.md index b97e4d8dd..8f08afca3 100644 --- a/src/main/java/g3601_3700/s3615_longest_palindromic_path_in_graph/readme.md +++ b/src/main/java/g3601_3700/s3615_longest_palindromic_path_in_graph/readme.md @@ -16,7 +16,7 @@ Return the **maximum** possible length of a **palindrome** that can be formed by **Output:** 3 -**Exp****lanation:** +**Explanation:** ![](https://assets.leetcode.com/uploads/2025/06/13/screenshot-2025-06-13-at-230714.png) diff --git a/src/main/java/g3701_3800/s3703_remove_k_balanced_substrings/readme.md b/src/main/java/g3701_3800/s3703_remove_k_balanced_substrings/readme.md index 38de2746a..20a41ed5d 100644 --- a/src/main/java/g3701_3800/s3703_remove_k_balanced_substrings/readme.md +++ b/src/main/java/g3701_3800/s3703_remove_k_balanced_substrings/readme.md @@ -8,7 +8,7 @@ A **string** is **k-balanced** if it is **exactly** `k` **consecutive** `'('` fo For example, if `k = 3`, k-balanced is `"((()))"`. -You must **repeatedly** remove all **non-overlapping k-balanced **substring**** from `s`, and then join the remaining parts. Continue this process until no k-balanced **substring** exists. +You must **repeatedly** remove all **non-overlapping k-balanced substring** from `s`, and then join the remaining parts. Continue this process until no k-balanced **substring** exists. Return the final string after all possible removals. diff --git a/src/main/java/g3701_3800/s3729_count_distinct_subarrays_divisible_by_k_in_sorted_array/readme.md b/src/main/java/g3701_3800/s3729_count_distinct_subarrays_divisible_by_k_in_sorted_array/readme.md index 00d7143a4..59475dfc6 100644 --- a/src/main/java/g3701_3800/s3729_count_distinct_subarrays_divisible_by_k_in_sorted_array/readme.md +++ b/src/main/java/g3701_3800/s3729_count_distinct_subarrays_divisible_by_k_in_sorted_array/readme.md @@ -4,7 +4,7 @@ Hard You are given an integer array `nums` **sorted** in **non-descending** order and a positive integer `k`. -A ****non-empty subarrays**** of `nums` is **good** if the sum of its elements is **divisible** by `k`. +A **non-empty subarrays** of `nums` is **good** if the sum of its elements is **divisible** by `k`. Return an integer denoting the number of **distinct** **good** subarrays of `nums`. diff --git a/src/main/java/g3701_3800/s3748_count_stable_subarrays/readme.md b/src/main/java/g3701_3800/s3748_count_stable_subarrays/readme.md index ed388d19a..4f79bb6d2 100644 --- a/src/main/java/g3701_3800/s3748_count_stable_subarrays/readme.md +++ b/src/main/java/g3701_3800/s3748_count_stable_subarrays/readme.md @@ -4,7 +4,7 @@ Hard You are given an integer array `nums`. -A ****non-empty subarrays**** of `nums` is called **stable** if it contains **no inversions**, i.e., there is no pair of indices `i < j` such that `nums[i] > nums[j]`. +A **non-empty subarrays** of `nums` is called **stable** if it contains **no inversions**, i.e., there is no pair of indices `i < j` such that `nums[i] > nums[j]`. You are also given a **2D integer array** `queries` of length `q`, where each queries[i] = [li, ri] represents a query. For each query [li, ri], compute the number of **stable subarrays** that lie entirely within the segment nums[li..ri]. diff --git a/src/main/java/g3701_3800/s3755_find_maximum_balanced_xor_subarray_length/readme.md b/src/main/java/g3701_3800/s3755_find_maximum_balanced_xor_subarray_length/readme.md index 6ca14238e..8b0b1129a 100644 --- a/src/main/java/g3701_3800/s3755_find_maximum_balanced_xor_subarray_length/readme.md +++ b/src/main/java/g3701_3800/s3755_find_maximum_balanced_xor_subarray_length/readme.md @@ -2,7 +2,7 @@ Medium -Given an integer array `nums`, return the **length** of the **longest **non-empty subarrays**** that has a bitwise XOR of zero and contains an **equal** number of **even** and **odd** numbers. If no such subarray exists, return 0. +Given an integer array `nums`, return the **length** of the **longest non-empty subarrays** that has a bitwise XOR of zero and contains an **equal** number of **even** and **odd** numbers. If no such subarray exists, return 0. **Example 1:**