Skip to content

Commit f098f29

Browse files
authored
Update README.md
1 parent d5c7d54 commit f098f29

File tree

1 file changed

+0
-22
lines changed
  • solution/1900-1999/1960.Maximum Product of the Length of Two Palindromic Substrings

1 file changed

+0
-22
lines changed

solution/1900-1999/1960.Maximum Product of the Length of Two Palindromic Substrings/README.md

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ tags:
6868
#### Python3
6969

7070
```python
71-
7271
class Solution:
7372
def maxProduct(self, s: str) -> int:
7473
n = len(s)
@@ -103,13 +102,11 @@ class Solution:
103102
suffix[~i] = max(suffix[~i], suffix[~i + 1])
104103

105104
return max(prefix[i - 1] * suffix[i] for i in range(1, n))
106-
107105
```
108106

109107
#### Java
110108

111109
```java
112-
113110
class Solution {
114111
public long maxProduct(String s) {
115112
int n = s.length();
@@ -163,13 +160,11 @@ class Solution {
163160
return P;
164161
}
165162
}
166-
167163
```
168164

169165
#### C++
170166

171167
```cpp
172-
173168
class Solution {
174169
public:
175170
long long maxProduct(string s) {
@@ -207,13 +202,11 @@ public:
207202
return res;
208203
}
209204
};
210-
211205
```
212206

213207
#### Go
214208

215209
```go
216-
217210
func maxProduct(s string) int64 {
218211
n := len(s)
219212
hlen := make([]int, n)
@@ -271,21 +264,6 @@ func maxProduct(s string) int64 {
271264

272265
return res
273266
}
274-
275-
func max(a, b int) int {
276-
if a > b {
277-
return a
278-
}
279-
return b
280-
}
281-
282-
func min(a, b int) int {
283-
if a < b {
284-
return a
285-
}
286-
return b
287-
}
288-
289267
```
290268

291269
<!-- tabs:end -->

0 commit comments

Comments
 (0)