From c96bdff2e0e6dd835bbf2c99f404db8091bef886 Mon Sep 17 00:00:00 2001 From: Amit S Sahu Date: Mon, 21 Oct 2024 10:25:34 +0530 Subject: [PATCH] Create README - LeetHub --- .../README.md | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 1593-split-a-string-into-the-max-number-of-unique-substrings/README.md diff --git a/1593-split-a-string-into-the-max-number-of-unique-substrings/README.md b/1593-split-a-string-into-the-max-number-of-unique-substrings/README.md new file mode 100644 index 0000000..bb7ffb8 --- /dev/null +++ b/1593-split-a-string-into-the-max-number-of-unique-substrings/README.md @@ -0,0 +1,42 @@ +

1593. Split a String Into the Max Number of Unique Substrings

Medium


Given a string s, return the maximum number of unique substrings that the given string can be split into.

+ +

You can split string s into any list of non-empty substrings, where the concatenation of the substrings forms the original string. However, you must split the substrings such that all of them are unique.

+ +

A substring is a contiguous sequence of characters within a string.

+ +

 

+

Example 1:

+ +
+Input: s = "ababccc"
+Output: 5
+Explanation: One way to split maximally is ['a', 'b', 'ab', 'c', 'cc']. Splitting like ['a', 'b', 'a', 'b', 'c', 'cc'] is not valid as you have 'a' and 'b' multiple times.
+
+ +

Example 2:

+ +
+Input: s = "aba"
+Output: 2
+Explanation: One way to split maximally is ['a', 'ba'].
+
+ +

Example 3:

+ +
+Input: s = "aa"
+Output: 1
+Explanation: It is impossible to split the string any further.
+
+ +

 

+

Constraints:

+ +