Java Easy Solution [ 100% ] [ 1ms ]
Approach\n- Iterate through each word in the list.\n- Extract the first character of each word.\n- Concatenate these characters into a single string.\n- Check i
# Approach\n- Iterate through each word in the list.\n- Extract the first character of each word.\n- Concatenate these characters into a single string.\n- Check if the resulting string matches the input string `s`.\n\n# Complexity\n- Time complexity:\nO(n)\n\n- Space complexity:\nO(1)\n\n# Code\n```\nclass Solution {\n    public boolean isAcronym(List<String> words, String s) {\n        StringBuilder str=new StringBuilder();\n        for(String word : words){\n            str.append(word.charAt(0));\n        }\n        return str.toString().equals(s);\n    }\n}\n```\n\n![193730892e8675ebafc11519f6174bee5c4a5ab0.jpeg](https://assets.leetcode.com/users/images/c77dc822-e8c6-4582-b70a-e0baa49d46ca_1718525930.675666.jpeg)\n
['Java']