#include using namespace std; class Solution{ public: bool closeStrings(string word1, string word2){ if(word1.length()!=word2.length()) return false; const int char_nums = 26; int word1_chars[char_nums] = {}; int word2_chars[char_nums] = {}; for(int i = 0 ; i < word1.length();i++){ int word1_char = word1[i] - 'a'; int word2_char = word2[i] - 'a'; word1_chars[word1_char]++; word2_chars[word2_char]++; } for(int i = 0 ; i