✅100% Faster O(N) time and O(1) space
Approach\nThe whole point is that we want to check that after concatinating all the first char of words we can generate s string or not.\n\n1. we can use string
# Approach\nThe whole point is that we want to check that after concatinating all the first char of words we can generate s string or not.\n\n1. we can use string builder and then match them .It is good enough but not faster and space efficient.\n2. rather we can maintain pointer who will check all the characters inside the loop\n3. we have three case here.\n    - general case : where length of s is equla to len of list. it is take care by the loop and pointer.\n    - second one is j >= len. when the length of list is greater than the string .it is also take care by the loop\n    - third one is imp where the len of string is greater than list. so need to make a last check condition at last.\n\n\n# Complexity\n- Time complexity:\nO(N)\n- Space complexity:\nO(1)\n\n# Code\n**Java**\n```\nclass Solution {\n    public boolean isAcronym(List<String> words, String s) {\n        \n        int j = 0 , len = s.length();\n        for(String str : words)\n            if(j >= len || s.charAt(j++)!= str.charAt(0)) \n                return false;\n        return j == len;       \n    }\n}\n```\n\n**C++**\n```\nclass Solution {\npublic:\n    bool isAcronym(vector<string>& words, string s) {\n        int j = 0, len = s.length();\n        for (const string& str : words) {\n            if (j >= len || s[j++] != str[0])\n                return false;\n        }\n        return j == len;\n    }\n};\n```
['Two Pointers', 'String', 'String Matching', 'C++', 'Java']