HTMLify

LeetCode - Counting Words With a Given Prefix - Python
Views: 16 | Author: abh
class Solution:
    def prefixCount(self, words: List[str], pref: str) -> int:
        return len(list(filter(lambda e:e.startswith(pref), words)))

Comments