Skip to content

Commit decfe11

Browse files
committed
add 383. Ransom Note
1 parent fca8c7d commit decfe11

File tree

2 files changed

+53
-46
lines changed

2 files changed

+53
-46
lines changed

Easy/383. Ransom Note.py

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Problem Statement: https://leetcode.com/problems/ransom-note/
2+
3+
class Solution:
4+
def canConstruct(self, ransomNote: str, magazine: str) -> bool:
5+
for i in set(ransomNote):
6+
if ransomNote.count(i) > magazine.count(i):
7+
return False
8+
return True
9+

README.md

+44-46
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,58 @@
11
<div align="center">
22
<a href= "https://leetcode.com/yashitanamdeo/"><img src="https://user-images.githubusercontent.com/49322948/150185385-9e463109-24ef-4c01-9ebf-7b7d57d8cf18.png" width="450" height="auto/"/><br><br><br><br>
3-
43

5-
[![Solved](https://img.shields.io/badge/Solved-182/2249-337ab7.svg?style=flat)](https://github.com/yashitanamdeo/leetcode)
4+
5+
[![Solved](https://img.shields.io/badge/Solved-187/2249-337ab7.svg?style=flat)](https://github.com/yashitanamdeo/leetcode)
66
[![Easy](https://img.shields.io/badge/Easy-80-5cb85c.svg?style=flat)](https://github.com/yashitanamdeo/leetcode/tree/main/Easy)
77
[![Medium](https://img.shields.io/badge/Medium-56-f0ad4e.svg?style=flat)](https://github.com/yashitanamdeo/leetcode/tree/main/Medium)
88
[![Hard](https://img.shields.io/badge/Hard-12-d9534f.svg?style=flat)](https://github.com/yashitanamdeo/leetcode/tree/main/Hard)
99
</br>
1010
[![Languages](https://img.shields.io/badge/Languages-Python-red.svg?style=flat)](https://github.com/yashitanamdeo/leetcode)
1111
[![Author](https://img.shields.io/badge/Author-Yashita%20Namdeo-blue.svg?style=flat)](https://leetcode.com/yashitanamdeo/)
1212

13-
14-
15-
1613
<br><br>
1714
[Python](https://github.com/yashitanamdeo/leetcode) full list to be updated...(Readme is in progress) + SQL questions
1815

19-
| # | Title | Solution | Difficulty |
20-
|---| ----- | -------- | --------------------- |
21-
| 1 | [Two Sum](https://leetcode.com/problems/two-sum/) | [Python](https://github.com/yashitanamdeo/leetcode/blob/main/Easy/1.%20Two%20Sum.py) | Easy |
22-
| 2 | [Add Two Numbers](https://leetcode.com/problems/add-two-numbers) | [Python]() | Medium |
23-
| 26 | [Remove Duplicates from Sorted Array](https://leetcode.com/problems/remove-duplicates-from-sorted-array/) | [Python](https://github.com/yashitanamdeo/leetcode/blob/main/Easy/26.%20Remove%20Duplicates%20from%20Sorted%20Array.py) | Easy |
24-
| 27 | [Remove Element](https://leetcode.com/problems/remove-element/) | [Python](https://github.com/yashitanamdeo/leetcode/blob/main/Easy/27.%20Remove%20Element.py) | Easy |
25-
| 35 | [Search Insert Position](https://leetcode.com/problems/search-insert-position/) | [Python](https://github.com/yashitanamdeo/leetcode/blob/main/Easy/35.%20Search%20Insert%20Position.py) | Easy |
26-
| 53 | [Maximum Subarray](https://leetcode.com/problems/maximum-subarray/) | [Python](https://github.com/yashitanamdeo/leetcode/blob/main/Easy/53.%20Maximum%20Subarray.py) | Easy |
27-
| 67 | [Add Binary](https://leetcode.com/problems/add-binary/) | [Python](https://github.com/yashitanamdeo/leetcode/blob/main/Easy/67.%20Add%20Binary.py) | Easy |
28-
| 121 | [Best Time to Buy and Sell Stock](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/) | [Python](https://github.com/yashitanamdeo/leetcode/blob/main/Easy/121.%20Best%20Time%20to%20Buy%20and%20Sell%20Stock.py) | Easy |
29-
| | []() | []() | |
30-
| | []() | []() | |
31-
| | []() | []() | |
32-
| | []() | []() | |
33-
| | []() | []() | |
34-
| | []() | []() | |
35-
| | []() | []() | |
36-
| | []() | []() | |
37-
| | []() | []() | |
38-
| | []() | []() | |
39-
| | []() | []() | |
40-
| | []() | []() | |
41-
| | []() | []() | |
42-
| | []() | []() | |
43-
| | []() | []() | |
44-
| | []() | []() | |
45-
| | []() | []() | |
46-
| | []() | []() | |
47-
| | []() | []() | |
48-
| | []() | []() | |
49-
| | []() | []() | |
50-
| | []() | []() | |
51-
| | []() | []() | |
52-
| | []() | []() | |
53-
| | []() | []() | |
54-
| | []() | []() | |
55-
| | []() | []() | |
56-
| | []() | []() | |
57-
| | []() | []() | |
58-
| | []() | []() | |
59-
| | []() | []() | |
16+
| # | Title | Solution | Difficulty |
17+
| --- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | ---------- |
18+
| 1 | [Two Sum](https://leetcode.com/problems/two-sum/) | [Python](https://github.com/yashitanamdeo/leetcode/blob/main/Easy/1.%20Two%20Sum.py) | Easy |
19+
| 2 | [Add Two Numbers](https://leetcode.com/problems/add-two-numbers) | [Python]() | Medium |
20+
| 26 | [Remove Duplicates from Sorted Array](https://leetcode.com/problems/remove-duplicates-from-sorted-array/) | [Python](https://github.com/yashitanamdeo/leetcode/blob/main/Easy/26.%20Remove%20Duplicates%20from%20Sorted%20Array.py) | Easy |
21+
| 27 | [Remove Element](https://leetcode.com/problems/remove-element/) | [Python](https://github.com/yashitanamdeo/leetcode/blob/main/Easy/27.%20Remove%20Element.py) | Easy |
22+
| 35 | [Search Insert Position](https://leetcode.com/problems/search-insert-position/) | [Python](https://github.com/yashitanamdeo/leetcode/blob/main/Easy/35.%20Search%20Insert%20Position.py) | Easy |
23+
| 53 | [Maximum Subarray](https://leetcode.com/problems/maximum-subarray/) | [Python](https://github.com/yashitanamdeo/leetcode/blob/main/Easy/53.%20Maximum%20Subarray.py) | Easy |
24+
| 67 | [Add Binary](https://leetcode.com/problems/add-binary/) | [Python](https://github.com/yashitanamdeo/leetcode/blob/main/Easy/67.%20Add%20Binary.py) | Easy |
25+
| 121 | [Best Time to Buy and Sell Stock](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/) | [Python](https://github.com/yashitanamdeo/leetcode/blob/main/Easy/121.%20Best%20Time%20to%20Buy%20and%20Sell%20Stock.py) | Easy |
26+
| | []() | []() | |
27+
| | []() | []() | |
28+
| | []() | []() | |
29+
| | []() | []() | |
30+
| | []() | []() | |
31+
| | []() | []() | |
32+
| | []() | []() | |
33+
| | []() | []() | |
34+
| | []() | []() | |
35+
| | []() | []() | |
36+
| | []() | []() | |
37+
| | []() | []() | |
38+
| | []() | []() | |
39+
| | []() | []() | |
40+
| | []() | []() | |
41+
| | []() | []() | |
42+
| | []() | []() | |
43+
| | []() | []() | |
44+
| | []() | []() | |
45+
| | []() | []() | |
46+
| | []() | []() | |
47+
| | []() | []() | |
48+
| | []() | []() | |
49+
| | []() | []() | |
50+
| | []() | []() | |
51+
| | []() | []() | |
52+
| | []() | []() | |
53+
| | []() | []() | |
54+
| | []() | []() | |
55+
| | []() | []() | |
56+
| | []() | []() | |
57+
6058
</div>

0 commit comments

Comments
 (0)