Optimised || 100% || better approach
Intuition\nYou no need to append characters into a string. The function can return false once the first character of the string on a list does not match with th
# Intuition\nYou no need to append characters into a string. The function can return false once the first character of the string on a list does not match with the corresponding character at index of the input string.\n\n# Approach\nThe code is easily understandable.\nFirst check whether the size of the list and the input string length are equal. you can straight away return false if it is not equal.\n\nIterate through the list and check whether the first character of each string on a list matches the characters of the input string.\nIf the characters doesn\'t match, return false and no longer the loop continues.\nThe loop ends if all the characters are matched and the result could be obviously true.\nReturn true.\n\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        if(words.size()!=s.length()) return false;\n        for(int i = 0;i<words.size();i++){\n            if(words.get(i).charAt(0)!=s.charAt(i)) return false;\n        }\n        return true;\n    }\n}\n```
['Array', 'Java']