Are They Pangrams
Updated
Problem statement
A sentence is a pangram if it contains every English lowercase letter from a through z at least once.
You are given an array of strings pangram. Each string contains only lowercase English letters and spaces. For each string, write 1 if it is a pangram and 0 otherwise.
Return one string formed by concatenating these characters in input order. Spaces and repeated occurrences of a letter do not add distinct letters.
Function
isPangram(pangram: String[]) → StringExamples
Example 1
pangram = ["pack my box with five dozen liquor jugs","this is not a pangram"]return = "10"The first sentence contains all 26 letters. The second does not, so the two results concatenate to 10.
Example 2
pangram = ["abcdefghijklmnopqrstuvwxyz","abcdefghijklmnopqrstuvwxy","z"]return = "100"The first string covers the full alphabet. The second is missing z, and the third contains only z.
Example 3
pangram = [" ","the quick brown fox jumps over the lazy dog","aaaa"]return = "010"A space supplies no letters. The middle sentence is a pangram. Repeating a does not supply the other letters.
Constraints
1 <= pangram.length <= 1001 <= pangram[i].length <= 10^5- Every string contains only lowercase English letters and spaces.
More Vanguard Online Assessment questions
- Two SumOA · Seen Sep 2026
- Valid ParenthesesOA · Seen Sep 2026
- Missing WordsOA · Seen Nov 2025
- Spam DetectionOA · Seen Nov 2025
- Binge WatchingOA · Seen Jan 2023
- Minimum Moves Around a Circular ArrayOA · Seen Aug 2022
- Maximum Occurring CharacterOA · Seen Mar 2022
- Picking TicketsOA · Seen Mar 2022
- Tool List: Two Smallest ValuesOA · Seen Nov 2021
- Group AnagramsOA · Seen Nov 2019
Similar questions at other companies
- Count Times Using at Most Two DigitsLSEG · OALSEG interview questions
- Palindrome-Rearrangeable PairsExpedia · OAExpedia interview questions
- Palindrome PermutationRippling · OARippling interview questions
- Operations to Reduce a Binary String Value to ZeroMarshall Wace · OAMarshall Wace interview questions
- Minimum No-Repeat Segments After One Character RemovalSalesforce · OASalesforce interview questions
- Password Clues and the Next CommandOpenAI · OAOpenAI interview questions
- Set Total Palindrome Transformation CostIntuit · OAIntuit interview questions
- Longest Substring with Even OccurrencesDeloitte · OADeloitte interview questions
- Decrement a Binary Number and Count Its OnesZipRecruiter · OAZipRecruiter interview questions
- Maximize Binary XOR with a Set-Bit LimitJP Morgan Chase · PHONE SCREENJP Morgan Chase interview questions