diff --git a/Algorithms/0828. Unique Letter String/828. Unique Letter String.go b/Algorithms/0828. COPYRIGHT PROBLEM XXX/828. Unique Letter String.go similarity index 100% rename from Algorithms/0828. Unique Letter String/828. Unique Letter String.go rename to Algorithms/0828. COPYRIGHT PROBLEM XXX/828. Unique Letter String.go diff --git a/Algorithms/0828. Unique Letter String/828. Unique Letter String_test.go b/Algorithms/0828. COPYRIGHT PROBLEM XXX/828. Unique Letter String_test.go similarity index 100% rename from Algorithms/0828. Unique Letter String/828. Unique Letter String_test.go rename to Algorithms/0828. COPYRIGHT PROBLEM XXX/828. Unique Letter String_test.go diff --git a/Algorithms/0828. Unique Letter String/README.md b/Algorithms/0828. COPYRIGHT PROBLEM XXX/README.md similarity index 79% rename from Algorithms/0828. Unique Letter String/README.md rename to Algorithms/0828. COPYRIGHT PROBLEM XXX/README.md index 8f7914e5..b26bae01 100644 --- a/Algorithms/0828. Unique Letter String/README.md +++ b/Algorithms/0828. COPYRIGHT PROBLEM XXX/README.md @@ -2,33 +2,14 @@ ## 题目 -A character is unique in string `S` if it occurs exactly once in it. - -For example, in string `S = "LETTER"`, the only unique characters are `"L"` and `"R"`. - -Let's define `UNIQ(S)` as the number of unique characters in string `S`. - -For example, `UNIQ("LETTER") = 2`. - -Given a string `S` with only uppercases, calculate the sum of `UNIQ(substring)` over all non-empty substrings of `S`. - -If there are two or more equal substrings at different positions in `S`, we consider them different. - -Since the answer can be very large, return the answer modulo `10 ^ 9 + 7`. +THIS PROBLEM COPYRIGHT BELONGS TO CODILITY.COM **Example 1:** - Input: "ABC" - Output: 10 - Explanation: All possible substrings are: "A","B","C","AB","BC" and "ABC". - Evey substring is composed with only unique letters. - Sum of lengths of all substring is 1 + 1 + 1 + 2 + 2 + 3 = 10 + **Example 2:** - Input: "ABA" - Output: 8 - Explanation: The same as example 1, except uni("ABA") = 1. ## 题目大意 diff --git a/README.md b/README.md index 90034f1f..258fef96 100644 --- a/README.md +++ b/README.md @@ -895,7 +895,7 @@ | 0825 | Friends Of Appropriate Ages | | 36.50% | Medium | | | 0826 | Most Profit Assigning Work | [Go](https://github.com/halfrost/LeetCode-Go/tree/master/Algorithms/0826.%20Most%20Profit%20Assigning%20Work) | 35.90% | Medium | | | 0827 | Making A Large Island | | 43.40% | Hard | | -| 0828 | Unique Letter String |[Go](https://github.com/halfrost/LeetCode-Go/tree/master/Algorithms/0828.%20Unique%20Letter%20String) | 39.80% | Hard | | +| 0828 | Unique Letter String |[Go]() | 39.80% | Hard | | | 0829 | Consecutive Numbers Sum | | 33.50% | Hard | | | 0830 | Positions of Large Groups | | 47.90% | Easy | | | 0831 | Masking Personal Information | | 42.20% | Medium | | @@ -1454,7 +1454,7 @@ |[713. Subarray Product Less Than K](https://leetcode.com/problems/subarray-product-less-than-k)| [Go](https://github.com/halfrost/LeetCode-Go/tree/master/Algorithms/0713.%20Subarray%20Product%20Less%20Than%20K)| Medium | O(n)| O(1)|| |[763. Partition Labels](https://leetcode.com/problems/partition-labels)| [Go](https://github.com/halfrost/LeetCode-Go/tree/master/Algorithms/0763.%20Partition%20Labels)| Medium | O(n)| O(1)|❤️| |[826. Most Profit Assigning Work](https://leetcode.com/problems/most-profit-assigning-work)| [Go](https://github.com/halfrost/LeetCode-Go/tree/master/Algorithms/0826.%20Most%20Profit%20Assigning%20Work)| Medium | O(n log n)| O(n)|| -|[828. Unique Letter String](https://leetcode.com/problems/unique-letter-string)| [Go](https://github.com/halfrost/LeetCode-Go/tree/master/Algorithms/0828.%20Unique%20Letter%20String)| Hard | O(n)| O(1)|❤️| +|[828. Unique Letter String](https://leetcode.com/problems/unique-letter-string)| [Go]()| Hard | O(n)| O(1)|❤️| |[838. Push Dominoes](https://leetcode.com/problems/push-dominoes)| [Go](https://github.com/halfrost/LeetCode-Go/tree/master/Algorithms/0838.%20Push%20Dominoes)| Medium | O(n)| O(n)|| |[844. Backspace String Compare](https://leetcode.com/problems/backspace-string-compare)| [Go](https://github.com/halfrost/LeetCode-Go/tree/master/Algorithms/0844.%20Backspace%20String%20Compare)| Easy | O(n)| O(n) || |[845. Longest Mountain in Array](https://leetcode.com/problems/longest-mountain-in-array)| [Go](https://github.com/halfrost/LeetCode-Go/tree/master/Algorithms/0845.%20Longest%20Mountain%20in%20Array)| Medium | O(n)| O(1) ||