Counting Words With A Given Prefix In PHP: 2
Iterate through array, check if prefix is part of each word using substr function. Time complexity: O(n * m).
Iterate through array, check if prefix is part of each word using substr function. Time complexity: O(n * m).