LeetCode-521 Longest Uncommon Subsequence I Solution (with Java)

1. Description:

Notes:

2. Examples:

3.Solutions:

1 class Solution {
2     public int findLUSlength(String a, String b) {
3         return a.equals(b) ? -1 : Math.max(a.length(), b.length());
4     }
5 }

 

原文地址:https://www.cnblogs.com/sheepcore/p/12396404.html