Files
Sam Chukwuzube 0f0c01e077 [Pangram]: fix redundant double iteration in dig deeper solution (#3948)
Issue: Current implementation creates an intermediate list from a set, which is redundant and inefficient.

**Before:**
```python
return len([ltr for ltr in set(sentence.lower()) if ltr.isalpha()]) == 26
```
**After:**
```python
return len(set(ltr for ltr in sentence.lower() if ltr.isalpha())) == 26
```
Why this is better:
- Eliminates double iteration: Old version iterates once for set(), again for list comprehension
- Removes unnecessary list creation: No need to convert set → list just to count
- Better memory usage: Generator expression feeds directly into set constructor
- Same time complexity but more efficient constant factors

Reviewed-by: bethanyg

* docs(pangram): improve approach's content and links
* docs(pangram): improve approach's content and links
* docs(pangram): improve performance content and links
* Added princemuel as contributor
---------

Co-authored-by: BethanyG <BethanyG@users.noreply.github.com>
2025-08-06 12:49:43 -07:00
..