Skip to content

Commit 2e2196e

Browse files
committedJan 1, 2023
feat: add solutions to lc problems: No.2520~2523
* No.2520.Count the Digits That Divide a Number * No.2521.Distinct Prime Factors of Product of Array * No.2522.Partition String Into Substrings With Values at Most K * No.2523.Closest Prime Numbers in Range
1 parent 7440cfa commit 2e2196e

File tree

64 files changed

+2552
-688
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+2552
-688
lines changed
 

‎solution/0000-0099/0053.Maximum Subarray/README_EN.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,31 @@
44

55
## Description
66

7-
<p>Given an integer array <code>nums</code>, find the <span data-keyword="subarray-nonempty">subarray</span> which has the largest sum and return <em>its sum</em>.</p>
7+
<p>Given an integer array <code>nums</code>, find the <span data-keyword="subarray-nonempty">subarray</span> with the largest sum, and return <em>its sum</em>.</p>
88

99
<p>&nbsp;</p>
1010
<p><strong class="example">Example 1:</strong></p>
1111

1212
<pre>
1313
<strong>Input:</strong> nums = [-2,1,-3,4,-1,2,1,-5,4]
1414
<strong>Output:</strong> 6
15-
<strong>Explanation:</strong> [4,-1,2,1] has the largest sum = 6.
15+
<strong>Explanation:</strong> The subarray [4,-1,2,1] has the largest sum 6.
1616
</pre>
1717

1818
<p><strong class="example">Example 2:</strong></p>
1919

2020
<pre>
2121
<strong>Input:</strong> nums = [1]
2222
<strong>Output:</strong> 1
23+
<strong>Explanation:</strong> The subarray [1] has the largest sum 1.
2324
</pre>
2425

2526
<p><strong class="example">Example 3:</strong></p>
2627

2728
<pre>
2829
<strong>Input:</strong> nums = [5,4,-1,7,8]
2930
<strong>Output:</strong> 23
31+
<strong>Explanation:</strong> The subarray [5,4,-1,7,8] has the largest sum 23.
3032
</pre>
3133

3234
<p>&nbsp;</p>

‎solution/0000-0099/0074.Search a 2D Matrix/README_EN.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@
44

55
## Description
66

7-
<p>Write an efficient algorithm that searches for a value <code>target</code> in an <code>m x n</code> integer matrix <code>matrix</code>. This matrix has the following properties:</p>
7+
<p>You are given an <code>m x n</code> integer matrix <code>matrix</code> with the following two properties:</p>
88

99
<ul>
10-
<li>Integers in each row are sorted from left to right.</li>
10+
<li>Each row is sorted in non-decreasing order.</li>
1111
<li>The first integer of each row is greater than the last integer of the previous row.</li>
1212
</ul>
1313

14+
<p>Given an integer <code>target</code>, return <code>true</code> <em>if</em> <code>target</code> <em>is in</em> <code>matrix</code> <em>or</em> <code>false</code> <em>otherwise</em>.</p>
15+
16+
<p>You must write a solution in <code>O(log(m * n))</code> time complexity.</p>
17+
1418
<p>&nbsp;</p>
1519
<p><strong class="example">Example 1:</strong></p>
1620
<img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0000-0099/0074.Search%20a%202D%20Matrix/images/mat.jpg" style="width: 322px; height: 242px;" />

0 commit comments

Comments
 (0)