leetcode/include/s0003_longest_substring_without_repeating_characters.hpp

22 lines
530 B
C++
Raw Normal View History

#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