Longest Substring Without Repeating Characters

This commit is contained in:
2022-03-20 11:37:54 +08:00
parent 7d5f585e91
commit e5239dbae7
3 changed files with 68 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
#ifndef S0003_LONGEST_SUBSTRING_WITHOUT_REPEATING_CHARACTERS_HPP
#define S0003_LONGEST_SUBSTRING_WITHOUT_REPEATING_CHARACTERS_HPP
#include <map>
#include <string>
class Solution {
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