Tap here to switch tabs
Problem
Submissions

Problem: Check if a String Is an Acronym of Words

med
30 min
Try to solve the Check if a String Is an Acronym of Words problem.

Statement

Given an array of strings words and a string s, determine if s is an acronym of words.

The string s is considered an acronym of words if it can be created by concatenating the first character of each string in words in order.

Return true if s is an acronym of words, and false otherwise.

Constraints:

  • 1≤1 \leq words.length ≤100\leq 100

  • 1≤1 \leq words[i].length ≤10\leq 10

  • 1≤1 \leq s.length ≤100\leq 100

  • words[i] and s consist of lowercase English letters.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Check if a String Is an Acronym of Words

med
30 min
Try to solve the Check if a String Is an Acronym of Words problem.

Statement

Given an array of strings words and a string s, determine if s is an acronym of words.

The string s is considered an acronym of words if it can be created by concatenating the first character of each string in words in order.

Return true if s is an acronym of words, and false otherwise.

Constraints:

  • 1≤1 \leq words.length ≤100\leq 100

  • 1≤1 \leq words[i].length ≤10\leq 10

  • 1≤1 \leq s.length ≤100\leq 100

  • words[i] and s consist of lowercase English letters.