Unit 3 Session 1 (Click for link to problem statements)
Understand what the interviewer is asking for by using test cases and questions about the problem.
Plan the solution with appropriate visualizations and pseudocode.
General Idea: Check if each and every letter of the alphabet is found in the input string.
1) First create a string of every letter in the alphabet
2) Loop over each character of the alphabet string
a) If the character is in the input string, do nothing (keep looping)
b) If the character is not in the input string, return False
3) If the loop ends and all characters are found, return True
def is_pangram(myStr):
alphabet = "abcdefghijklmnopqrstuvwxyz"
for char in alphabet:
if char not in myStr.lower():
return False
return True