Skip to content

Commit ed7f77d

Browse files
committed
008
1 parent 6c9e279 commit ed7f77d

9 files changed

+497
-15
lines changed

Algorithms/LongestPalindromicSubstring.cs

+11-2
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,25 @@
88
* the maximum length of S is 1000, and there exists one unique longest palindromic
99
* substring.
1010
***************************************************************************************/
11-
using System;
11+
using Algorithms.Utils;
1212
namespace Algorithms
1313
{
1414
public class Solution005
1515
{
1616
public static string LongestPalindromicWithSuffixTree(string s)
1717
{
18-
throw new NotImplementedException("TODO");
18+
var n = s.Length;
19+
if(n == 0){ return ""; }
20+
SuffixTree sTree = new SuffixTree(s);
21+
sTree.Create();
22+
for(var i = 0; i < n-1; i++)
23+
{
24+
25+
}
26+
return "";
1927
}
2028

29+
2130
public static string LongestPalindromicSubstring(string s)
2231
{
2332
var n = s.Length;

Algorithms/ReverseInteger.cs

916 Bytes
Binary file not shown.

Algorithms/StringtoInteger_atoi.cs

4.52 KB
Binary file not shown.

Algorithms/Utils/Helper.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public static ListNode<int> ToListNode(this List<int> lst)
1818
}
1919
return head;
2020
}
21-
throw new Exception("input is not a valid array");
21+
throw new Exception("input is not a valid List");
2222
}
2323
public static List<int> ToList(this ListNode<int> node)
2424
{

0 commit comments

Comments
 (0)