LC.P2828[判别首字母缩略词] 方法一:模拟12345678910111213class Solution { public boolean isAcronym(List<String> words, String s) { if (words.size() != s.length()) { return false; } for (int i = 0; i < s.length(); ++i) { if (words.get(i).charAt(0) != s.charAt(i)) { return false; } } return true; }} 时间复杂度:$O(n)$,$n$为$words$的长度 空间复杂度:$O(1)$