1class Solution {2public:3bool isAlienSorted(vector<string> &words, string order) {4unordered_map<char, char> m;5for (int i = 0; i < 26; i++) {6m[order[i]] = i + 'a';7}8for (auto &w : words) {9for (auto &ch : w) {10ch = m[ch];11}12}13return is_sorted(words.begin(), words.end()); // check sorting14}15};16// if you like the solution plz upvote;