File tree 7 files changed +43
-4
lines changed
7 files changed +43
-4
lines changed Original file line number Diff line number Diff line change @@ -250,3 +250,4 @@ paket-files/
250
250
# JetBrains Rider
251
251
.idea /
252
252
* .sln.iml
253
+ xidel /
Original file line number Diff line number Diff line change
1
+ // Source : https://leetcode.com/problems/longest-palindromic-substring/
2
+ // Author : codeyu
3
+ // Date : 2016-09-22
4
+
5
+ /***************************************************************************************
6
+ *
7
+ * Given a string S, find the longest palindromic substring in S. You may assume that
8
+ * the maximum length of S is 1000, and there exists one unique longest palindromic
9
+ * substring.
10
+ ***************************************************************************************/
11
+
12
+ namespace Algorithms
13
+ {
14
+ public class Solution005
15
+ {
16
+ public static string LongestPalindromicSubstring ( string s )
17
+ {
18
+ return "" ;
19
+ }
20
+ }
21
+ }
Original file line number Diff line number Diff line change
1
+ using Algorithms ;
2
+ using Xunit ;
3
+ namespace AlgorithmsTest
4
+ {
5
+ public class LongestPalindromicSubstringTest
6
+ {
7
+ [ Theory ]
8
+ [ InlineData ( "XMADAMYX" , "MADAM" ) ]
9
+ [ InlineData ( "bbba" , "bbb" ) ]
10
+ [ InlineData ( "googlelevel" , "level" ) ]
11
+ public void Test_LongestPalindromicSubstring ( string input , string output )
12
+ {
13
+ Assert . Equal ( output , Solution005 . LongestPalindromicSubstring ( input ) ) ;
14
+ }
15
+ }
16
+ }
Original file line number Diff line number Diff line change @@ -10,4 +10,5 @@ LeetCode
10
10
| 001| [ Two Sum] ( https://leetcode.com/problems/two-sum/ ) | [ C#] ( ./Algorithms/TwoSum.cs ) | Easy|
11
11
| 002| [ Add Two Numbers] ( https://leetcode.com/problems/add-two-numbers/ ) | [ C#] ( ./Algorithms/AddTwoNumbers.cs ) | Medium|
12
12
| 003| [ Longest Substring Without Repeating Characters] ( https://leetcode.com/problems/longest-substring-without-repeating-characters/ ) | [ C#] ( ./Algorithms/LengthOfLongestSubstring.cs ) | Medium|
13
- | 004| [ Median of Two Sorted Arrays] ( https://leetcode.com/problems/median-of-two-sorted-arrays/ ) | [ C#] ( ./Algorithms/FindMedianSortedArrays.cs ) | Hard|
13
+ | 004| [ Median of Two Sorted Arrays] ( https://leetcode.com/problems/median-of-two-sorted-arrays/ ) | [ C#] ( ./Algorithms/FindMedianSortedArrays.cs ) | Hard|
14
+ | 005| [ Longest Palindromic Substring] ( https://leetcode.com/problems/longest-palindromic-substring/ ) | [ C#] ( ./Algorithms/LongestPalindromicSubstring.cs ) | Medium|
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ The comments would be generated by above examples as below:
58
58
For example:
59
59
60
60
```
61
- $ ./readme.sh ../algorithms/cpp/nextPermutation/nextPermutation.cpp
62
- |31|[Next Permutation ](https://oj. leetcode.com/problems/next-permutation /) | [C++ ](./algorithms/cpp/nextPermutation/nextPermutation.cpp)|Medium |
61
+ $ ./readme.sh ../Algorithms/TwoSumTest.cs
62
+ |001|[Two Sum ](https://leetcode.com/problems/two-sum /) | [C# ](./Algorithms/TwoSum.cs)|Easy |
63
63
```
64
64
Original file line number Diff line number Diff line change @@ -28,6 +28,6 @@ NUM=`echo ${title_str} | awk -F '.' '{print $1}'`
28
28
TITLE=` echo ${title_str} | awk -F ' .' ' {print $2}' | sed -e ' s/^[[:space:]]*//' `
29
29
DIFFCULT=` xidel ${URL} -q -e " css('.question-info')" | grep Difficulty | awk ' {print $2}' `
30
30
31
- FILE=` echo ${FILE} | sed " s/.*\/algorithms /\.\/algorithms /" `
31
+ FILE=` echo ${FILE} | sed " s/.*\/Algorithms /\.\/Algorithms /" `
32
32
33
33
echo " |${NUM} |[${TITLE} ](${URL} ) | [C#](${FILE} )|${DIFFCULT} |"
You can’t perform that action at this time.
0 commit comments