Skip to content

Commit c6b63bd

Browse files
refactor 521
1 parent 4f2cc57 commit c6b63bd

File tree

1 file changed

+0
-21
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-21
lines changed

src/main/java/com/fishercoder/solutions/_521.java

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 521. Longest Uncommon Subsequence I
5-
*
6-
* Given a group of two strings, you need to find the longest uncommon subsequence of this group of two strings.
7-
* The longest uncommon subsequence is defined as the longest subsequence of one of these strings and this subsequence should not be any subsequence of the other strings.
8-
* A subsequence is a sequence that can be derived from one sequence by deleting some characters without changing the order of the remaining elements.
9-
* Trivially, any string is a subsequence of itself and an empty string is a subsequence of any string.
10-
* The input will be two strings, and the output needs to be the length of the longest uncommon subsequence.
11-
* If the longest uncommon subsequence doesn't exist, return -1.
12-
13-
Example 1:
14-
Input: "aba", "cdc"
15-
Output: 3
16-
Explanation: The longest uncommon subsequence is "aba" (or "cdc"),
17-
because "aba" is a subsequence of "aba",
18-
but not a subsequence of any other strings in the group of two strings.
19-
20-
Note:
21-
Both strings' lengths will not exceed 100.
22-
Only letters from a ~ z will appear in input strings.
23-
*/
243
public class _521 {
254
public static class Solution1 {
265
/**

0 commit comments

Comments
 (0)