Prefix Count

Problem statement

A prefix of a string is any leading contiguous substring of the string. Given an array of strings words and a string pref, return the number of strings in words that contain pref as a prefix. A prefix of a string is any leading contiguous substring of the string.

Example 1

Sample input

Get hands-on with 1400+ tech skills courses.