s4553711
11/2/2017 - 2:12 PM

521.cpp

class Solution {
public:
    int findLUSlength(string a, string b) {
        int sa = a.size();
        int sb = b.size();
        if (sa != sb) {
            return max(sa, sb);
        } else if (a != b) {
            return sa;
        } else {
            return -1;
        }
    }
};