✅ [Python/Rust] just one-liners using hashset... (with detailed comments)
IF YOU LIKE THIS SOLUTION, PLEASE UPVOTE.\n\nPython. This solution employs a simple one-liner using set. It demonstrated 28 ms runtime (97.56%) and used 13.8 MB
**IF YOU LIKE THIS SOLUTION, PLEASE UPVOTE.**\n\n**Python.** This [**solution**](https://leetcode.com/submissions/detail/824403614/) employs a simple one-liner using *set*. It demonstrated **28 ms runtime (97.56%)** and used **13.8 MB memory (95.55%)**. Time complexity is linear: **O(n)**. Space complexity is constant: **O(1)**. \n```\nclass Solution:\n    def checkIfPangram(self, sentence: str) -> bool:\n        # in Python, a set can automatically be constructed\n        # from iterables such as strings, lists, ...\n        return len(set(sentence)) == 26\n```\n\n**Rust.** This [**solution**](https://leetcode.com/submissions/detail/824403614/) employs a simple one-liner using *HashSet*. It demonstrated **0 ms runtime (100.00%)** and used **2.2 MB memory (26.92%)**. Time complexity is linear: **O(n)**. Space complexity is constant: **O(1)**. \n```\nuse std::collections::HashSet;\n\nimpl Solution \n{\n    pub fn check_if_pangram(sentence: String) -> bool \n    {\n        // in Rust, a HashSet can automatically be\n        // built (collected) from an iterator \n        sentence.chars().collect::<HashSet<char>>().len() == 26\n    }\n}\n```
['Python', 'Rust']