This commit is contained in:
36
include/s0005_longest_palindromic_substring.hpp
Normal file
36
include/s0005_longest_palindromic_substring.hpp
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef S0005_LONGEST_PALINDROMIC_SUBSTRING
|
||||
#define S0005_LONGEST_PALINDROMIC_SUBSTRING
|
||||
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
using namespace std;
|
||||
|
||||
class Solution1 {
|
||||
public:
|
||||
/**
|
||||
* @brief Longest Palindromic Substring
|
||||
*
|
||||
* Given a string s, return the longest palindromic substring in s.
|
||||
*
|
||||
* @param s the given string
|
||||
* @return longest palindromic substring
|
||||
*/
|
||||
string longestPalindrome(string s);
|
||||
};
|
||||
|
||||
class Solution2 {
|
||||
public:
|
||||
/**
|
||||
* @brief Longest Palindromic Substring
|
||||
*
|
||||
* Given a string s, return the longest palindromic substring in s.
|
||||
*
|
||||
* @param s the given string
|
||||
* @return longest palindromic substring
|
||||
*/
|
||||
string longestPalindrome(string s);
|
||||
};
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user