2022-03-20 03:37:54 +00:00
|
|
|
#ifndef S0003_LONGEST_SUBSTRING_WITHOUT_REPEATING_CHARACTERS_HPP
|
|
|
|
#define S0003_LONGEST_SUBSTRING_WITHOUT_REPEATING_CHARACTERS_HPP
|
|
|
|
|
|
|
|
#include <map>
|
|
|
|
#include <string>
|
|
|
|
|
2022-11-30 10:20:36 +00:00
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
class S0003 {
|
2022-03-20 03:37:54 +00:00
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* @brief Longest Substring Without Repeating Characters
|
|
|
|
*
|
|
|
|
* Given a string `s`, find the length of the **longest substring** without
|
|
|
|
* repeating characters.
|
|
|
|
*
|
|
|
|
* @param s the given string
|
|
|
|
* @return the longest substring without repeating characters
|
|
|
|
*/
|
|
|
|
int lengthOfLongestSubstring(std::string s);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|