Skip to content

Commit 14a41d0

Browse files
committed
Fix PR review comments: remove broken image links, fix space complexity, correct trace tables, fix SQL peak hours
1 parent 64f72bd commit 14a41d0

File tree

14 files changed

+25
-36
lines changed

14 files changed

+25
-36
lines changed

books/All.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10773,7 +10773,6 @@ https://leetcode.com/problems/design-exam-scores-tracker/
1077310773

1077410774
The goal is to maintain sorted lists of times and scores, along with prefix sums for efficient range sum queries. We use binary search to find the range of indices that fall within the query time range.
1077510775

10776-
![Visualization showing sorted times with prefix sums for range queries]
1077710776

1077810777
**1.3 Brute force vs. optimized strategy:**
1077910778

explanations/3531/en.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
The goal is to efficiently check for each building whether it has neighbors in all four directions. We group buildings by their x and y coordinates, then sort each group to quickly check for the existence of buildings in each direction.
1717

18-
![Visualization showing a covered building with neighbors in all four directions]
1918

2019
**1.3 Brute force vs. optimized strategy:**
2120

explanations/3702/en.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
The goal is to find the longest subsequence with non-zero XOR. If the entire array has non-zero XOR, we can take all elements. Otherwise, we need to remove at least one element to make the XOR non-zero.
1717

18-
![Visualization showing XOR operation and subsequence selection]
1918

2019
**1.3 Brute force vs. optimized strategy:**
2120

explanations/3703/en.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
The goal is to use a stack-like structure that groups consecutive characters. When we see k closing parentheses following at least k opening parentheses, we remove them. This simulates the repeated removal process efficiently.
1717

18-
![Visualization showing stack-based removal of k-balanced substrings]
1918

2019
**1.3 Brute force vs. optimized strategy:**
2120

explanations/3705/en.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
The goal is to aggregate order data by customer, calculate peak hour percentages, rating statistics, and filter customers who meet all four criteria. We use SQL aggregation functions with conditional logic to compute the required metrics.
1717

18-
![Visualization showing customer order patterns with peak hours highlighted]
1918

2019
**1.3 Brute force vs. optimized strategy:**
2120

explanations/3708/en.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
The goal is to scan through the array and track the longest contiguous sequence that follows the Fibonacci property. We maintain a running length and extend it when the current element equals the sum of the previous two.
1717

18-
![Visualization showing Fibonacci subarray with each element being the sum of previous two]
1918

2019
**1.3 Brute force vs. optimized strategy:**
2120

explanations/3709/en.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
The goal is to maintain sorted lists of times and scores, along with prefix sums for efficient range sum queries. We use binary search to find the range of indices that fall within the query time range.
1717

18-
![Visualization showing sorted times with prefix sums for range queries]
1918

2019
**1.3 Brute force vs. optimized strategy:**
2120

explanations/3713/en.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@
88

99
* **Input Size:** The string `s` can have up to 1000 characters, consisting of lowercase English letters.
1010
* **Time Complexity:** O(n^2) - We check all possible substrings by fixing start and end positions, and use a Counter to track character frequencies in O(1) per operation.
11-
* **Space Complexity:** O(n) - In the worst case, we store up to 26 distinct characters in the Counter.
11+
* **Space Complexity:** O(1) - The Counter can hold at most 26 distinct characters (lowercase English letters), regardless of string length.
1212
* **Edge Case:** If all characters are the same, the entire string is balanced with length n.
1313

1414
**1.2 High-level approach:**
1515

1616
The goal is to check all possible substrings and find the longest one where all distinct characters have equal frequency. We use a Counter to track character counts as we extend substrings.
1717

18-
![Visualization showing balanced substring with equal character frequencies]
1918

2019
**1.3 Brute force vs. optimized strategy:**
2120

explanations/3714/en.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
The goal is to use prefix sums to efficiently find substrings where character frequencies are balanced. For a balanced substring S[i:j], the differences in prefix counts must be equal. We use hash maps to track the first occurrence of each (difference pattern, remaining count) combination.
1717

18-
![Visualization showing prefix sum differences for balanced substrings]
1918

2019
**1.3 Brute force vs. optimized strategy:**
2120

explanations/3719/en.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
The goal is to check all possible subarrays and find the longest one where distinct even numbers equal distinct odd numbers. We use sets to efficiently track distinct values as we extend subarrays.
1717

18-
![Visualization showing subarray with balanced distinct even and odd numbers]
1918

2019
**1.3 Brute force vs. optimized strategy:**
2120

0 commit comments

Comments
 (0)