Skip to content

Commit 105a0fa

Browse files
committed
Add solution #1832
1 parent 213d3ac commit 105a0fa

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@
239239
1672|[Richest Customer Wealth](./1672-richest-customer-wealth.js)|Easy|
240240
1748|[Sum of Unique Elements](./1748-sum-of-unique-elements.js)|Easy|
241241
1780|[Check if Number is a Sum of Powers of Three](./1780-check-if-number-is-a-sum-of-powers-of-three.js)|Medium|
242+
1832|[Check if the Sentence Is Pangram](./1832-check-if-the-sentence-is-pangram.js)|Easy|
242243
1880|[Check if Word Equals Summation of Two Words](./1880-check-if-word-equals-summation-of-two-words.js)|Easy|
243244
1886|[Determine Whether Matrix Can Be Obtained By Rotation](./1886-determine-whether-matrix-can-be-obtained-by-rotation.js)|Easy|
244245
1920|[Build Array from Permutation](./1920-build-array-from-permutation.js)|Easy|
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* 1832. Check if the Sentence Is Pangram
3+
* https://leetcode.com/problems/check-if-the-sentence-is-pangram/
4+
* Difficulty: Easy
5+
*
6+
* A pangram is a sentence where every letter of the English alphabet appears
7+
* at least once.
8+
*
9+
* Given a string sentence containing only lowercase English letters, return
10+
* true if sentence is a pangram, or false otherwise.
11+
*/
12+
13+
/**
14+
* @param {string} sentence
15+
* @return {boolean}
16+
*/
17+
var checkIfPangram = function(sentence) {
18+
return new Set([...sentence]).size === 26;
19+
};

0 commit comments

Comments
 (0)