#include <algorithm>
class Solution {
public:
/**
* 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
*
*
* @param s string字符串
* @param c string字符串
* @return int整型
*/
int isCongruent(string s, string c) {
// write code here
sort(s.begin(), s.end());
sort(c.begin(), c.end());
if (s != c) {
return -1;
}
return s.size();
}
};

京公网安备 11010502036488号