Skip to content

Commit e785504

Browse files
committed
ignore descriptions
1 parent 64161f6 commit e785504

File tree

5 files changed

+8
-193
lines changed

5 files changed

+8
-193
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ venv
99
leetcode-problems-tmp.json
1010

1111
scripts/__pycache__/
12+
descriptions/

books/All.md

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -8922,68 +8922,6 @@ class Solution:
89228922
return res
89238923
```
89248924

8925-
## 1431. Kids With the Greatest Number of Candies [Easy]
8926-
https://leetcode.com/problems/kids-with-the-greatest-number-of-candies/
8927-
8928-
### Explanation
8929-
8930-
## 1431. Kids With the Greatest Number of Candies [Easy]
8931-
8932-
https://leetcode.com/problems/kids-with-the-greatest-number-of-candies
8933-
8934-
## Description
8935-
There are `n` kids with candies. You are given an integer array `candies`, where each `candies[i]` represents the number of candies the `i`th kid has, and an integer `extraCandies`, denoting the number of extra candies that you have.
8936-
8937-
Return a boolean array `result` of length `n`, where `result[i]` is `true` if, after giving the `i`th kid all the `extraCandies`, they will have the greatest number of candies among all the kids, or false otherwise.
8938-
8939-
Note that multiple kids can have the greatest number of candies.
8940-
8941-
**Examples**
8942-
8943-
```text
8944-
Input: candies = [2,3,5,1,3], extraCandies = 3
8945-
Output: [true,true,true,false,true]
8946-
Explanation: If you give all extraCandies to:
8947-
- Kid 1, they will have 2 + 3 = 5 candies, which is the greatest among the kids.
8948-
- Kid 2, they will have 3 + 3 = 6 candies, which is the greatest among the kids.
8949-
- Kid 3, they will have 5 + 3 = 8 candies, which is the greatest among the kids.
8950-
- Kid 4, they will have 1 + 3 = 4 candies, which is not the greatest among the kids.
8951-
- Kid 5, they will have 3 + 3 = 6 candies, which is the greatest among the kids.
8952-
8953-
Input: candies = [4,2,1,1,2], extraCandies = 1
8954-
Output: [true,false,false,false,false]
8955-
8956-
Input: candies = [12,1,12], extraCandies = 10
8957-
Output: [true,false,true]
8958-
```
8959-
8960-
**Constraints**
8961-
8962-
```text
8963-
- n == candies.length
8964-
- 2 <= n <= 100
8965-
- 1 <= candies[i] <= 100
8966-
- 1 <= extraCandies <= 50
8967-
```
8968-
8969-
## Hint
8970-
For each kid, check if their candies plus `extraCandies` is at least as much as the current maximum.
8971-
8972-
## Explanation
8973-
First, you want to know the highest number of candies any kid currently has. This is important because you need a reference point to see if giving extra candies to a kid will make them "the greatest."
8974-
8975-
For each kid, you add the `extraCandies` to their current amount. You do this because you want to see if, after the bonus, they can reach or beat the current maximum. If they do, you mark them as `True` in our answer list; otherwise, False.
8976-
8977-
You only need to find the maximum once, and then just compare each kid's total to it. Don't need to recalculate the maximum for every kid.
8978-
8979-
### Solution
8980-
8981-
```python
8982-
def kidsWithCandies(candies, extraCandies):
8983-
max_candies = max(candies) # Find the current maximum
8984-
return [(c + extraCandies) >= max_candies for c in candies]
8985-
```
8986-
89878925
## 1448. Count Good Nodes in Binary Tree [Medium]
89888926
https://leetcode.com/problems/count-good-nodes-in-binary-tree/
89898927

books/LeetCode_75.md

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -517,68 +517,6 @@ def uniqueOccurrences(arr):
517517
return len(set(count.values())) == len(count)
518518
```
519519

520-
## 1431. Kids With the Greatest Number of Candies [Easy]
521-
https://leetcode.com/problems/kids-with-the-greatest-number-of-candies/
522-
523-
### Explanation
524-
525-
## 1431. Kids With the Greatest Number of Candies [Easy]
526-
527-
https://leetcode.com/problems/kids-with-the-greatest-number-of-candies
528-
529-
## Description
530-
There are `n` kids with candies. You are given an integer array `candies`, where each `candies[i]` represents the number of candies the `i`th kid has, and an integer `extraCandies`, denoting the number of extra candies that you have.
531-
532-
Return a boolean array `result` of length `n`, where `result[i]` is `true` if, after giving the `i`th kid all the `extraCandies`, they will have the greatest number of candies among all the kids, or false otherwise.
533-
534-
Note that multiple kids can have the greatest number of candies.
535-
536-
**Examples**
537-
538-
```text
539-
Input: candies = [2,3,5,1,3], extraCandies = 3
540-
Output: [true,true,true,false,true]
541-
Explanation: If you give all extraCandies to:
542-
- Kid 1, they will have 2 + 3 = 5 candies, which is the greatest among the kids.
543-
- Kid 2, they will have 3 + 3 = 6 candies, which is the greatest among the kids.
544-
- Kid 3, they will have 5 + 3 = 8 candies, which is the greatest among the kids.
545-
- Kid 4, they will have 1 + 3 = 4 candies, which is not the greatest among the kids.
546-
- Kid 5, they will have 3 + 3 = 6 candies, which is the greatest among the kids.
547-
548-
Input: candies = [4,2,1,1,2], extraCandies = 1
549-
Output: [true,false,false,false,false]
550-
551-
Input: candies = [12,1,12], extraCandies = 10
552-
Output: [true,false,true]
553-
```
554-
555-
**Constraints**
556-
557-
```text
558-
- n == candies.length
559-
- 2 <= n <= 100
560-
- 1 <= candies[i] <= 100
561-
- 1 <= extraCandies <= 50
562-
```
563-
564-
## Hint
565-
For each kid, check if their candies plus `extraCandies` is at least as much as the current maximum.
566-
567-
## Explanation
568-
First, you want to know the highest number of candies any kid currently has. This is important because you need a reference point to see if giving extra candies to a kid will make them "the greatest."
569-
570-
For each kid, you add the `extraCandies` to their current amount. You do this because you want to see if, after the bonus, they can reach or beat the current maximum. If they do, you mark them as `True` in our answer list; otherwise, False.
571-
572-
You only need to find the maximum once, and then just compare each kid's total to it. Don't need to recalculate the maximum for every kid.
573-
574-
### Solution
575-
576-
```python
577-
def kidsWithCandies(candies, extraCandies):
578-
max_candies = max(candies) # Find the current maximum
579-
return [(c + extraCandies) >= max_candies for c in candies]
580-
```
581-
582520
## 2215. Find the Difference of Two Arrays [Easy]
583521
https://leetcode.com/problems/find-the-difference-of-two-arrays/
584522

books/Visualization.md

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -86,68 +86,6 @@ def __init__(self, val=0, next=None):
8686
self.next = next
8787
```
8888

89-
## 1431. Kids With the Greatest Number of Candies [Easy]
90-
https://leetcode.com/problems/kids-with-the-greatest-number-of-candies/
91-
92-
### Explanation
93-
94-
## 1431. Kids With the Greatest Number of Candies [Easy]
95-
96-
https://leetcode.com/problems/kids-with-the-greatest-number-of-candies
97-
98-
## Description
99-
There are `n` kids with candies. You are given an integer array `candies`, where each `candies[i]` represents the number of candies the `i`th kid has, and an integer `extraCandies`, denoting the number of extra candies that you have.
100-
101-
Return a boolean array `result` of length `n`, where `result[i]` is `true` if, after giving the `i`th kid all the `extraCandies`, they will have the greatest number of candies among all the kids, or false otherwise.
102-
103-
Note that multiple kids can have the greatest number of candies.
104-
105-
**Examples**
106-
107-
```text
108-
Input: candies = [2,3,5,1,3], extraCandies = 3
109-
Output: [true,true,true,false,true]
110-
Explanation: If you give all extraCandies to:
111-
- Kid 1, they will have 2 + 3 = 5 candies, which is the greatest among the kids.
112-
- Kid 2, they will have 3 + 3 = 6 candies, which is the greatest among the kids.
113-
- Kid 3, they will have 5 + 3 = 8 candies, which is the greatest among the kids.
114-
- Kid 4, they will have 1 + 3 = 4 candies, which is not the greatest among the kids.
115-
- Kid 5, they will have 3 + 3 = 6 candies, which is the greatest among the kids.
116-
117-
Input: candies = [4,2,1,1,2], extraCandies = 1
118-
Output: [true,false,false,false,false]
119-
120-
Input: candies = [12,1,12], extraCandies = 10
121-
Output: [true,false,true]
122-
```
123-
124-
**Constraints**
125-
126-
```text
127-
- n == candies.length
128-
- 2 <= n <= 100
129-
- 1 <= candies[i] <= 100
130-
- 1 <= extraCandies <= 50
131-
```
132-
133-
## Hint
134-
For each kid, check if their candies plus `extraCandies` is at least as much as the current maximum.
135-
136-
## Explanation
137-
First, you want to know the highest number of candies any kid currently has. This is important because you need a reference point to see if giving extra candies to a kid will make them "the greatest."
138-
139-
For each kid, you add the `extraCandies` to their current amount. You do this because you want to see if, after the bonus, they can reach or beat the current maximum. If they do, you mark them as `True` in our answer list; otherwise, False.
140-
141-
You only need to find the maximum once, and then just compare each kid's total to it. Don't need to recalculate the maximum for every kid.
142-
143-
### Solution
144-
145-
```python
146-
def kidsWithCandies(candies, extraCandies):
147-
max_candies = max(candies) # Find the current maximum
148-
return [(c + extraCandies) >= max_candies for c in candies]
149-
```
150-
15189
## 1798. Maximum Number of Consecutive Values You Can Make [Medium]
15290
https://leetcode.com/problems/maximum-number-of-consecutive-values-you-can-make/
15391

data/book-sets.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@
5757
202, 205, 206, 207, 208, 209, 210, 211, 212, 215, 216, 217, 219, 221, 222, 224, 226, 228, 230, 234, 235, 236, 238, 240, 242, 268, 274, 278, 283,
5858
287, 289, 290, 295, 297, 300, 322, 328, 334, 337, 338, 344, 345, 347, 373, 374, 378, 380, 383, 392, 394, 399, 409, 412, 427, 433, 435, 437, 438,
5959
443, 448, 450, 452, 460, 494, 502, 509, 530, 543, 547, 560, 581, 605, 617, 637, 643, 647, 649, 695, 700, 701, 704, 714, 724, 733, 735, 739, 746,
60-
790, 841, 872, 875, 876, 901, 909, 918, 933, 973, 981, 994, 997, 1004, 1029, 1046, 1071, 1127, 1137, 1143, 1161, 1167, 1207, 1249, 1268, 1288,
61-
1304, 1318, 1337, 1372, 1423, 1431, 1448, 1456, 1466, 1480, 1493, 1515, 1523, 1528, 1557, 1584, 1657, 1672, 1679, 1704, 1732, 1768, 1798, 1920,
62-
1925, 1926, 1929, 1957, 1963, 2011, 2095, 2119, 2130, 2211, 2215, 2300, 2336, 2352, 2390, 2419, 2462, 2542, 2627, 2703, 2723, 2769, 2807, 2862,
63-
2879, 2884, 2888, 2894, 2942, 3100, 3110, 3133, 3164, 3190, 3197, 3228, 3291, 3320, 3351, 3380, 3381, 3413, 3424, 3432, 3444, 3471, 3512, 3522,
64-
3602, 3603, 3606, 3607, 3608, 3622, 3623, 3625, 3663, 3668, 3678, 3683, 3688, 3692, 3697, 3701, 3707, 3712, 3718, 3722, 3723, 3724, 3726, 3727,
65-
3728, 3731, 3736, 3737, 3738, 3739, 3740, 3741, 3742, 3743, 3745, 3747, 3748, 3750, 3751, 3752, 3753, 3754, 3755, 3756, 3757, 3759, 3760, 3761,
66-
3762, 3764, 3765, 3766, 3767, 3768, 3769, 3770, 3771, 3772
60+
790, 841, 872, 875, 876, 901, 909, 918, 933, 973, 981, 994, 997, 1004, 1029, 1046, 1127, 1137, 1143, 1161, 1167, 1207, 1249, 1268, 1288, 1304,
61+
1318, 1337, 1372, 1423, 1448, 1456, 1466, 1480, 1493, 1515, 1523, 1528, 1557, 1584, 1657, 1672, 1679, 1704, 1732, 1798, 1920, 1925, 1926, 1929,
62+
1957, 1963, 2011, 2095, 2119, 2130, 2211, 2215, 2300, 2336, 2352, 2390, 2419, 2462, 2542, 2627, 2703, 2723, 2769, 2807, 2862, 2879, 2884, 2888,
63+
2894, 2942, 3100, 3110, 3133, 3164, 3190, 3197, 3228, 3291, 3320, 3351, 3380, 3381, 3413, 3424, 3432, 3444, 3471, 3512, 3522, 3602, 3603, 3606,
64+
3607, 3608, 3622, 3623, 3625, 3663, 3668, 3678, 3683, 3688, 3692, 3697, 3701, 3707, 3712, 3718, 3722, 3723, 3724, 3726, 3727, 3728, 3731, 3736,
65+
3737, 3738, 3739, 3740, 3741, 3742, 3743, 3745, 3747, 3748, 3750, 3751, 3752, 3753, 3754, 3755, 3756, 3757, 3759, 3760, 3761, 3762, 3764, 3765,
66+
3766, 3767, 3768, 3769, 3770, 3771, 3772
6767
]
6868
},
6969
{"title": "Visualization", "description": "", "tags": [], "problems": [1, 2, 11, 1431, 1679, 1768, 1798, 2215, 3603, 3622, 3623]},

0 commit comments

Comments
 (0)