Best O(N) Solution
Approach\nSingle Iteration\n\n# Complexity\n- Time complexity:\nO(n)\n\n- Space complexity:\nO(1)\n\n# Code\n\nclass Solution {\npublic:\n    bool isAcronym(vec
# Approach\nSingle Iteration\n\n# Complexity\n- Time complexity:\n$$O(n)$$\n\n- Space complexity:\n$$O(1)$$\n\n# Code\n```\nclass Solution {\npublic:\n    bool isAcronym(vector<string>& words, string s) {\n        if (words.size() != s.size())\n            return false;\n        for (int i = 0; i < s.size(); i++) {\n            if (s[i] != words[i][0])\n                return false;\n        }\n        return true;\n    }\n};\n```
['C++']