Skip to content

Commit 1db7fe0

Browse files
Zanger67/leetcodeZanger67/leetcode
authored andcommitted
Updated markdown files
1 parent d7eaa52 commit 1db7fe0

File tree

8 files changed

+53
-6
lines changed

8 files changed

+53
-6
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# **[LeetCode Records](https://leetcode.com/u/Zanger/)** (622 solved)
1+
# **[LeetCode Records](https://leetcode.com/u/Zanger/)** (623 solved)
22

33
<!-- This readme was generated using [WikiLeet](<https://github.com/Zanger67/WikiLeet>) -->
44

@@ -556,6 +556,7 @@ This repo is a collection of my LeetCode solutions, primarily written in Python,
556556
| 2460 | [Apply Operations to an Array](<https://leetcode.com/problems/apply-operations-to-an-array>) | Easy | Daily | [solution](<markdowns/_2460. Apply Operations to an Array.md>) | py |
557557
| 2473 | [Minimum Cost to Buy Apples](<https://leetcode.com/problems/minimum-cost-to-buy-apples>) | Medium | | [solution](<markdowns/_2473. Minimum Cost to Buy Apples.md>) | py |
558558
| 2482 | [Difference Between Ones and Zeros in Row and Column](<https://leetcode.com/problems/difference-between-ones-and-zeros-in-row-and-column>) | Medium | | [solution](<markdowns/_2482. Difference Between Ones and Zeros in Row and Column.md>) | py |
559+
| 2483 | [Minimum Penalty for a Shop](<https://leetcode.com/problems/minimum-penalty-for-a-shop>) | Medium | | [solution](<markdowns/_2483. Minimum Penalty for a Shop.md>) | py |
559560
| 2486 | [Append Characters to String to Make Subsequence](<https://leetcode.com/problems/append-characters-to-string-to-make-subsequence>) | Medium | Daily | [solution](<markdowns/_2486. Append Characters to String to Make Subsequence.md>) | c, java, py |
560561
| 2487 | [Remove Nodes From Linked List](<https://leetcode.com/problems/remove-nodes-from-linked-list>) | Medium | | [solution](<markdowns/_2487. Remove Nodes From Linked List.md>) | py |
561562
| 2493 | [Divide Nodes Into the Maximum Number of Groups](<https://leetcode.com/problems/divide-nodes-into-the-maximum-number-of-groups>) | Hard | Daily | [solution](<markdowns/_2493. Divide Nodes Into the Maximum Number of Groups.md>) | py |

markdowns/Medium.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Medium Questions (401)
1+
# Medium Questions (402)
22

33
*[Back to top](<../README.md>)*
44

@@ -346,6 +346,7 @@
346346
| 2433 | [Find The Original Array of Prefix Xor](<https://leetcode.com/problems/find-the-original-array-of-prefix-xor>) | Medium | | [solution](<_2433. Find The Original Array of Prefix Xor.md>) | py | May 31, 2024 |
347347
| 2473 | [Minimum Cost to Buy Apples](<https://leetcode.com/problems/minimum-cost-to-buy-apples>) | Medium | | [solution](<_2473. Minimum Cost to Buy Apples.md>) | py | Jun 29, 2024 |
348348
| 2482 | [Difference Between Ones and Zeros in Row and Column](<https://leetcode.com/problems/difference-between-ones-and-zeros-in-row-and-column>) | Medium | | [solution](<_2482. Difference Between Ones and Zeros in Row and Column.md>) | py | Jun 07, 2024 |
349+
| 2483 | [Minimum Penalty for a Shop](<https://leetcode.com/problems/minimum-penalty-for-a-shop>) | Medium | | [solution](<_2483. Minimum Penalty for a Shop.md>) | py | Apr 11, 2025 |
349350
| 2486 | [Append Characters to String to Make Subsequence](<https://leetcode.com/problems/append-characters-to-string-to-make-subsequence>) | Medium | Daily | [solution](<_2486. Append Characters to String to Make Subsequence.md>) | c, java, py | Jun 03, 2024 |
350351
| 2487 | [Remove Nodes From Linked List](<https://leetcode.com/problems/remove-nodes-from-linked-list>) | Medium | | [solution](<_2487. Remove Nodes From Linked List.md>) | py | Jun 12, 2024 |
351352
| 2501 | [Longest Square Streak in an Array](<https://leetcode.com/problems/longest-square-streak-in-an-array>) | Medium | Daily | [solution](<_2501. Longest Square Streak in an Array.md>) | py | Oct 28, 2024 |

markdowns/Questions_By_Code_Length.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,7 @@ Calculations are based on the code files's byte sizes.
498498
| 131 | [Palindrome Partitioning](<https://leetcode.com/problems/palindrome-partitioning>) | Medium | N150 | [solution](<_131. Palindrome Partitioning.md>) | py | Jul 30, 2024 |
499499
| 3110 | [Score of a String](<https://leetcode.com/problems/score-of-a-string>) | Easy | Daily | [solution](<_3110. Score of a String.md>) | java, py | Jun 01, 2024 |
500500
| 213 | [House Robber II](<https://leetcode.com/problems/house-robber-ii>) | Medium | B75, N150 | [solution](<_213. House Robber II.md>) | py | Oct 24, 2024 |
501+
| 2483 | [Minimum Penalty for a Shop](<https://leetcode.com/problems/minimum-penalty-for-a-shop>) | Medium | | [solution](<_2483. Minimum Penalty for a Shop.md>) | py | Apr 11, 2025 |
501502
| 121 | [Best Time to Buy and Sell Stock](<https://leetcode.com/problems/best-time-to-buy-and-sell-stock>) | Easy | B75, N150 | [solution](<_121. Best Time to Buy and Sell Stock.md>) | py | Jul 03, 2024 |
502503
| 2599 | [Make the Prefix Sum Non-negative](<https://leetcode.com/problems/make-the-prefix-sum-non-negative>) | Medium | Weekly Premium | [solution](<_2599. Make the Prefix Sum Non-negative.md>) | py | Feb 10, 2025 |
503504
| 2545 | [Sort the Students by Their Kth Score](<https://leetcode.com/problems/sort-the-students-by-their-kth-score>) | Medium | | [solution](<_2545. Sort the Students by Their Kth Score.md>) | java, py | Jun 24, 2024 |

markdowns/Questions_By_Recent.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Calculations are based on the date of the first solve.
66

77
| # | Title | Level | Cats | Solution | Languages | Date Complete |
88
|-----:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------|:--------------------------|:----------------------------------------------------------------------------------------------------|:--------------------------------------------|:----------------|
9+
| 2483 | [Minimum Penalty for a Shop](<https://leetcode.com/problems/minimum-penalty-for-a-shop>) | Medium | | [solution](<_2483. Minimum Penalty for a Shop.md>) | py | Apr 11, 2025 |
910
| 323 | [Number of Connected Components in an Undirected Graph](<https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph>) | Medium | B75, N150, Weekly Premium | [solution](<_323. Number of Connected Components in an Undirected Graph.md>) | py | Apr 08, 2025 |
1011
| 3396 | [Minimum Number of Operations to Make Elements in Array Distinct](<https://leetcode.com/problems/minimum-number-of-operations-to-make-elements-in-array-distinct>) | Easy | Daily | [solution](<_3396. Minimum Number of Operations to Make Elements in Array Distinct.md>) | py | Apr 08, 2025 |
1112
| 416 | [Partition Equal Subset Sum](<https://leetcode.com/problems/partition-equal-subset-sum>) | Medium | Daily, N150 | [solution](<_416. Partition Equal Subset Sum.md>) | py | Apr 07, 2025 |

markdowns/Topics.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
------
66

77
- [Array](<by_topic/Array.md>) (306 completed)
8-
- [String](<by_topic/String.md>) (146 completed)
8+
- [String](<by_topic/String.md>) (147 completed)
99
- [Hash Table](<by_topic/Hash Table.md>) (139 completed)
1010
- [Depth-First Search](<by_topic/Depth-First Search.md>) (104 completed)
1111
- [Tree](<by_topic/Tree.md>) (91 completed)
@@ -27,7 +27,7 @@
2727
- [Backtracking](<by_topic/Backtracking.md>) (27 completed)
2828
- [Heap (Priority Queue)](<by_topic/Heap (Priority Queue).md>) (26 completed)
2929
- [Sliding Window](<by_topic/Sliding Window.md>) (23 completed)
30-
- [Prefix Sum](<by_topic/Prefix Sum.md>) (20 completed)
30+
- [Prefix Sum](<by_topic/Prefix Sum.md>) (21 completed)
3131
- [Trie](<by_topic/Trie.md>) (19 completed)
3232
- [Graph](<by_topic/Graph.md>) (19 completed)
3333
- [Recursion](<by_topic/Recursion.md>) (19 completed)
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# 2483. [Minimum Penalty for a Shop](<https://leetcode.com/problems/minimum-penalty-for-a-shop>)
2+
3+
*All prompts are owned by LeetCode. To view the prompt, click the title link above.*
4+
5+
*[Back to top](<../README.md>)*
6+
7+
------
8+
9+
> *First completed : April 11, 2025*
10+
>
11+
> *Last updated : April 11, 2025*
12+
13+
------
14+
15+
> **Related Topics** : **[String](<by_topic/String.md>), [Prefix Sum](<by_topic/Prefix Sum.md>)**
16+
>
17+
> **Acceptance Rate** : **67.55 %**
18+
19+
------
20+
21+
## Solutions
22+
23+
- [e2483.py](<../my-submissions/e2483.py>)
24+
### Python
25+
#### [e2483.py](<../my-submissions/e2483.py>)
26+
```Python
27+
class Solution:
28+
def countSymmetricIntegers(self, low: int, high: int) -> int:
29+
output = 0
30+
helper = (lambda x: sum(map(int, x[:len(x) // 2])) == sum(map(int, x[len(x) // 2:])))
31+
while low <= high :
32+
if len(str(low)) % 2 == 1 :
33+
low = 10 ** ceil(log(low + 1, 10))
34+
continue
35+
if helper(str(low)) :
36+
output += 1
37+
low += 1
38+
return output
39+
40+
```
41+

markdowns/by_topic/Prefix Sum.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# [Prefix Sum](<https://leetcode.com/tag/Prefix-Sum/>) (20 completed)
1+
# [Prefix Sum](<https://leetcode.com/tag/Prefix-Sum/>) (21 completed)
22

33
*[Back to top](<../../README.md>)*
44

@@ -22,6 +22,7 @@
2222
| 1524 | [Number of Sub-arrays With Odd Sum](<https://leetcode.com/problems/number-of-sub-arrays-with-odd-sum>) | Medium | Daily | [solution](<../_1524. Number of Sub-arrays With Odd Sum.md>) | py | Feb 26, 2025 |
2323
| 2083 | [Substrings That Begin and End With the Same Letter](<https://leetcode.com/problems/substrings-that-begin-and-end-with-the-same-letter>) | Medium | Weekly Premium | [solution](<../_2083. Substrings That Begin and End With the Same Letter.md>) | c, py | Jun 10, 2024 |
2424
| 2389 | [Longest Subsequence With Limited Sum](<https://leetcode.com/problems/longest-subsequence-with-limited-sum>) | Easy | | [solution](<../_2389. Longest Subsequence With Limited Sum.md>) | py | Jun 01, 2024 |
25+
| 2483 | [Minimum Penalty for a Shop](<https://leetcode.com/problems/minimum-penalty-for-a-shop>) | Medium | | [solution](<../_2483. Minimum Penalty for a Shop.md>) | py | Apr 11, 2025 |
2526
| 2955 | [Number of Same-End Substrings](<https://leetcode.com/problems/number-of-same-end-substrings>) | Medium | Weekly Premium | [solution](<../_2955. Number of Same-End Substrings.md>) | py | Nov 04, 2024 |
2627
| 3179 | Weekly Contest 401 - q2 - [Find the N-th Value After K Seconds](<https://leetcode.com/problems/find-the-n-th-value-after-k-seconds>) | Medium | Contest | [solution](<../_3179. Find the N-th Value After K Seconds.md>) | py | Jul 07, 2024 |
2728
| 3191 | [Minimum Operations to Make Binary Array Elements Equal to One I](<https://leetcode.com/problems/minimum-operations-to-make-binary-array-elements-equal-to-one-i>) | Medium | Daily | [solution](<../_3191. Minimum Operations to Make Binary Array Elements Equal to One I.md>) | java | Jun 22, 2024 |

markdowns/by_topic/String.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# [String](<https://leetcode.com/tag/String/>) (146 completed)
1+
# [String](<https://leetcode.com/tag/String/>) (147 completed)
22

33
*[Back to top](<../../README.md>)*
44

@@ -127,6 +127,7 @@
127127
| 2418 | [Sort the People](<https://leetcode.com/problems/sort-the-people>) | Easy | Daily | [solution](<../_2418. Sort the People.md>) | py | Jul 22, 2024 |
128128
| 2423 | [Remove Letter To Equalize Frequency](<https://leetcode.com/problems/remove-letter-to-equalize-frequency>) | Easy | | [solution](<../_2423. Remove Letter To Equalize Frequency.md>) | py | Jun 17, 2024 |
129129
| 2451 | [Odd String Difference](<https://leetcode.com/problems/odd-string-difference>) | Easy | | [solution](<../_2451. Odd String Difference.md>) | py | Sep 25, 2024 |
130+
| 2483 | [Minimum Penalty for a Shop](<https://leetcode.com/problems/minimum-penalty-for-a-shop>) | Medium | | [solution](<../_2483. Minimum Penalty for a Shop.md>) | py | Apr 11, 2025 |
130131
| 2486 | [Append Characters to String to Make Subsequence](<https://leetcode.com/problems/append-characters-to-string-to-make-subsequence>) | Medium | Daily | [solution](<../_2486. Append Characters to String to Make Subsequence.md>) | c, java, py | Jun 03, 2024 |
131132
| 2678 | [Number of Senior Citizens](<https://leetcode.com/problems/number-of-senior-citizens>) | Easy | Daily | [solution](<../_2678. Number of Senior Citizens.md>) | c, java, py | May 22, 2024 |
132133
| 2734 | [Lexicographically Smallest String After Substring Operation](<https://leetcode.com/problems/lexicographically-smallest-string-after-substring-operation>) | Medium | | [solution](<../_2734. Lexicographically Smallest String After Substring Operation.md>) | py | Jun 29, 2024 |

0 commit comments

Comments
 (0)