Skip to content

Commit 9d52c93

Browse files
Zanger67/leetcodeZanger67/leetcode
authored andcommitted
Updated markdown files
1 parent 8ff17f3 commit 9d52c93

10 files changed

+58
-10
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/)** (521 solved)
1+
# **[LeetCode Records](https://leetcode.com/u/Zanger/)** (522 solved)
22

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

@@ -315,6 +315,7 @@ This repo is a collection of my LeetCode solutions, primarily written in Python,
315315
| 1110 | [Delete Nodes And Return Forest](<https://leetcode.com/problems/delete-nodes-and-return-forest>) | Medium | Daily | [solution](<markdowns/_1110. Delete Nodes And Return Forest.md>) | py |
316316
| 1122 | [Relative Sort Array](<https://leetcode.com/problems/relative-sort-array>) | Easy | Daily | [solution](<markdowns/_1122. Relative Sort Array.md>) | java, py |
317317
| 1140 | [Stone Game II](<https://leetcode.com/problems/stone-game-ii>) | Medium | Daily | [solution](<markdowns/_1140. Stone Game II.md>) | py |
318+
| 1160 | [Find Words That Can Be Formed by Characters](<https://leetcode.com/problems/find-words-that-can-be-formed-by-characters>) | Easy | | [solution](<markdowns/_1160. Find Words That Can Be Formed by Characters.md>) | py |
318319
| 1161 | [Maximum Level Sum of a Binary Tree](<https://leetcode.com/problems/maximum-level-sum-of-a-binary-tree>) | Medium | | [solution](<markdowns/_1161. Maximum Level Sum of a Binary Tree.md>) | py |
319320
| 1166 | [Design File System](<https://leetcode.com/problems/design-file-system>) | Medium | | [solution](<markdowns/_1166. Design File System.md>) | py |
320321
| 1171 | [Remove Zero Sum Consecutive Nodes from Linked List](<https://leetcode.com/problems/remove-zero-sum-consecutive-nodes-from-linked-list>) | Medium | | [solution](<markdowns/_1171. Remove Zero Sum Consecutive Nodes from Linked List.md>) | py |

markdowns/Easy.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Easy Questions (155)
1+
# Easy Questions (156)
22

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

@@ -88,6 +88,7 @@
8888
| 1051 | [Height Checker](<https://leetcode.com/problems/height-checker>) | Easy | Daily | [solution](<_1051. Height Checker.md>) | c, py | Jun 10, 2024 |
8989
| 1068 | [Product Sales Analysis I](<https://leetcode.com/problems/product-sales-analysis-i>) | Easy | | [solution](<_1068. Product Sales Analysis I.md>) | sql | May 22, 2024 |
9090
| 1122 | [Relative Sort Array](<https://leetcode.com/problems/relative-sort-array>) | Easy | Daily | [solution](<_1122. Relative Sort Array.md>) | java, py | Jun 11, 2024 |
91+
| 1160 | [Find Words That Can Be Formed by Characters](<https://leetcode.com/problems/find-words-that-can-be-formed-by-characters>) | Easy | | [solution](<_1160. Find Words That Can Be Formed by Characters.md>) | py | Sep 24, 2024 |
9192
| 1184 | [Distance Between Bus Stops](<https://leetcode.com/problems/distance-between-bus-stops>) | Easy | | [solution](<_1184. Distance Between Bus Stops.md>) | py | May 31, 2024 |
9293
| 1252 | [Cells with Odd Values in a Matrix](<https://leetcode.com/problems/cells-with-odd-values-in-a-matrix>) | Easy | | [solution](<_1252. Cells with Odd Values in a Matrix.md>) | c | Jun 04, 2024 |
9394
| 1317 | [Convert Integer to the Sum of Two No-Zero Integers](<https://leetcode.com/problems/convert-integer-to-the-sum-of-two-no-zero-integers>) | Easy | | [solution](<_1317. Convert Integer to the Sum of Two No-Zero Integers.md>) | c | Jun 04, 2024 |

markdowns/Questions_By_Code_Length.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,7 @@ Calculations are based on the code files's byte sizes.
474474
| 2395 | [Find Subarrays With Equal Sum](<https://leetcode.com/problems/find-subarrays-with-equal-sum>) | Easy | | [solution](<_2395. Find Subarrays With Equal Sum.md>) | py | May 31, 2024 |
475475
| 1762 | [Buildings With an Ocean View](<https://leetcode.com/problems/buildings-with-an-ocean-view>) | Medium | | [solution](<_1762. Buildings With an Ocean View.md>) | py | Jun 10, 2024 |
476476
| 867 | [Transpose Matrix](<https://leetcode.com/problems/transpose-matrix>) | Easy | | [solution](<_867. Transpose Matrix.md>) | py | Jun 15, 2024 |
477+
| 1160 | [Find Words That Can Be Formed by Characters](<https://leetcode.com/problems/find-words-that-can-be-formed-by-characters>) | Easy | | [solution](<_1160. Find Words That Can Be Formed by Characters.md>) | py | Sep 24, 2024 |
477478
| 1844 | [Replace All Digits with Characters](<https://leetcode.com/problems/replace-all-digits-with-characters>) | Easy | | [solution](<_1844. Replace All Digits with Characters.md>) | py | Jun 29, 2024 |
478479
| 3178 | Weekly Contest 401 - q1 - [Find the Child Who Has the Ball After K Seconds](<https://leetcode.com/problems/find-the-child-who-has-the-ball-after-k-seconds>) | Easy | Contest | [solution](<_3178. Find the Child Who Has the Ball After K Seconds.md>) | py | Jul 07, 2024 |
479480
| 819 | [Most Common Word](<https://leetcode.com/problems/most-common-word>) | Easy | | [solution](<_819. Most Common Word.md>) | py | Sep 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+
| 1160 | [Find Words That Can Be Formed by Characters](<https://leetcode.com/problems/find-words-that-can-be-formed-by-characters>) | Easy | | [solution](<_1160. Find Words That Can Be Formed by Characters.md>) | py | Sep 24, 2024 |
910
| 819 | [Most Common Word](<https://leetcode.com/problems/most-common-word>) | Easy | | [solution](<_819. Most Common Word.md>) | py | Sep 24, 2024 |
1011
| 559 | [Maximum Depth of N-ary Tree](<https://leetcode.com/problems/maximum-depth-of-n-ary-tree>) | Easy | | [solution](<_559. Maximum Depth of N-ary Tree.md>) | py | Sep 24, 2024 |
1112
| 322 | [Coin Change](<https://leetcode.com/problems/coin-change>) | Medium | B75, N150 | [solution](<_322. Coin Change.md>) | py | Sep 24, 2024 |

markdowns/Topics.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
------
66

7-
- [Array](<by_topic/Array.md>) (245 completed)
8-
- [String](<by_topic/String.md>) (116 completed)
9-
- [Hash Table](<by_topic/Hash Table.md>) (112 completed)
7+
- [Array](<by_topic/Array.md>) (246 completed)
8+
- [String](<by_topic/String.md>) (117 completed)
9+
- [Hash Table](<by_topic/Hash Table.md>) (113 completed)
1010
- [Depth-First Search](<by_topic/Depth-First Search.md>) (88 completed)
1111
- [Tree](<by_topic/Tree.md>) (85 completed)
1212
- [Binary Tree](<by_topic/Binary Tree.md>) (77 completed)
@@ -22,7 +22,7 @@
2222
- [Simulation](<by_topic/Simulation.md>) (36 completed)
2323
- [Bit Manipulation](<by_topic/Bit Manipulation.md>) (31 completed)
2424
- [Design](<by_topic/Design.md>) (28 completed)
25-
- [Counting](<by_topic/Counting.md>) (24 completed)
25+
- [Counting](<by_topic/Counting.md>) (25 completed)
2626
- [Binary Search](<by_topic/Binary Search.md>) (23 completed)
2727
- [Backtracking](<by_topic/Backtracking.md>) (19 completed)
2828
- [Heap (Priority Queue)](<by_topic/Heap (Priority Queue).md>) (19 completed)
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# 1160. [Find Words That Can Be Formed by Characters](<https://leetcode.com/problems/find-words-that-can-be-formed-by-characters>)
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 : September 24, 2024*
10+
>
11+
> *Last updated : September 24, 2024*
12+
13+
------
14+
15+
> **Related Topics** : **[Array](<by_topic/Array.md>), [Hash Table](<by_topic/Hash Table.md>), [String](<by_topic/String.md>), [Counting](<by_topic/Counting.md>)**
16+
>
17+
> **Acceptance Rate** : **70.69 %**
18+
19+
------
20+
21+
## Solutions
22+
23+
- [e1160.py](<../my-submissions/e1160.py>)
24+
### Python
25+
#### [e1160.py](<../my-submissions/e1160.py>)
26+
```Python
27+
class Solution:
28+
def countCharacters(self, words: List[str], chars: str) -> int:
29+
chars = Counter(chars)
30+
31+
output = 0
32+
for word in words :
33+
wordCnt = Counter(word)
34+
if all(wordCnt[x] <= chars[x] for x in wordCnt) :
35+
output += len(word)
36+
37+
return output
38+
39+
```
40+

markdowns/by_topic/Array.md

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

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

@@ -124,6 +124,7 @@
124124
| 1110 | [Delete Nodes And Return Forest](<https://leetcode.com/problems/delete-nodes-and-return-forest>) | Medium | Daily | [solution](<../_1110. Delete Nodes And Return Forest.md>) | py | Jul 17, 2024 |
125125
| 1122 | [Relative Sort Array](<https://leetcode.com/problems/relative-sort-array>) | Easy | Daily | [solution](<../_1122. Relative Sort Array.md>) | java, py | Jun 11, 2024 |
126126
| 1140 | [Stone Game II](<https://leetcode.com/problems/stone-game-ii>) | Medium | Daily | [solution](<../_1140. Stone Game II.md>) | py | Aug 20, 2024 |
127+
| 1160 | [Find Words That Can Be Formed by Characters](<https://leetcode.com/problems/find-words-that-can-be-formed-by-characters>) | Easy | | [solution](<../_1160. Find Words That Can Be Formed by Characters.md>) | py | Sep 24, 2024 |
127128
| 1184 | [Distance Between Bus Stops](<https://leetcode.com/problems/distance-between-bus-stops>) | Easy | | [solution](<../_1184. Distance Between Bus Stops.md>) | py | May 31, 2024 |
128129
| 1218 | [Longest Arithmetic Subsequence of Given Difference](<https://leetcode.com/problems/longest-arithmetic-subsequence-of-given-difference>) | Medium | | [solution](<../_1218. Longest Arithmetic Subsequence of Given Difference.md>) | py | May 31, 2024 |
129130
| 1229 | [Meeting Scheduler](<https://leetcode.com/problems/meeting-scheduler>) | Medium | Weekly Premium | [solution](<../_1229. Meeting Scheduler.md>) | py | Sep 10, 2024 |

markdowns/by_topic/Counting.md

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

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

@@ -11,6 +11,7 @@
1111
| 692 | [Top K Frequent Words](<https://leetcode.com/problems/top-k-frequent-words>) | Medium | | [solution](<../_692. Top K Frequent Words.md>) | py | Jun 09, 2024 |
1212
| 819 | [Most Common Word](<https://leetcode.com/problems/most-common-word>) | Easy | | [solution](<../_819. Most Common Word.md>) | py | Sep 24, 2024 |
1313
| 945 | [Minimum Increment to Make Array Unique](<https://leetcode.com/problems/minimum-increment-to-make-array-unique>) | Medium | Daily | [solution](<../_945. Minimum Increment to Make Array Unique.md>) | py | Jun 14, 2024 |
14+
| 1160 | [Find Words That Can Be Formed by Characters](<https://leetcode.com/problems/find-words-that-can-be-formed-by-characters>) | Easy | | [solution](<../_1160. Find Words That Can Be Formed by Characters.md>) | py | Sep 24, 2024 |
1415
| 1481 | [Least Number of Unique Integers after K Removals](<https://leetcode.com/problems/least-number-of-unique-integers-after-k-removals>) | Medium | | [solution](<../_1481. Least Number of Unique Integers after K Removals.md>) | py | Jun 15, 2024 |
1516
| 1657 | [Determine if Two Strings Are Close](<https://leetcode.com/problems/determine-if-two-strings-are-close>) | Medium | | [solution](<../_1657. Determine if Two Strings Are Close.md>) | py | Jul 13, 2024 |
1617
| 1684 | [Count the Number of Consistent Strings](<https://leetcode.com/problems/count-the-number-of-consistent-strings>) | Easy | Daily | [solution](<../_1684. Count the Number of Consistent Strings.md>) | c, py | Jun 06, 2024 |

0 commit comments

Comments
 (0)