[LeetCode]#1832. Check if the Sentence Is Pangram

Input: sentence = "thequickbrownfoxjumpsoverthelazydog"
Output: true
Explanation: sentence contains at least one of every letter of the English alphabet.
  1. if string length is less than 26, return false
  2. Use counter. if key length is less than 26, return false
  3. else case, return True
from collections import Counter
class Solution:
def checkIfPangram(self, sentence):
if len(sentence)<26:
return False
if len(Counter(sentence).keys())<26:
return False
return True




Interesting in any computer science.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Build and Deploy a Symfony Application on AWS using CDK, ECS and RDS

Encrypted pandas DataFrames for secure storage and sharing in Python


Front-end and Back-end: The Art of Hiring Developers


Send HTTP Requests As Fast As Possible in Python

Deploy a Seldon Core Server with Language Wrapper in PrimeHub

An eyewitness history of SaaS in twelve chapters

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Fatboy Slim

Fatboy Slim

Interesting in any computer science.

More from Medium

Use of python dictionary get function

Implementing Linked List Operations in Python

LeetCode has a Medium coding Problem in Its’ Algorithm Section “Regular Expression Matching…

Basic Data Structure and Algorithms in Python