程式語言 - LeetCode - C++ - 521. Longest Uncommon Subsequence I



題目:


解答:

class Solution {
public:
    int findLUSlength(string a, string b) {
        if (a == b) {
            return -1;
        }

        return max(a.size(), b.size());
    }
};