ds-algo-study
Version:
Just experimenting with publishing a package
43 lines (40 loc) • 2.06 kB
HTML
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="description"
content="A description of the page and its contents"
/>
<link rel="stylesheet" href="styles.css" />
<title>Page Title</title>
<link rel="stylesheet" href="./../../../assets/style.css" />
<link rel="stylesheet" href="./../../../assets/prism.css" />
<script async src="./../../../assets/prism.js"></script>
</head>
<body>
<h1 id="longest-substring-without-repeating-characters">Longest Substring Without Repeating Characters</h1>
<blockquote>
<p>Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.</p>
</blockquote>
<p>Given a string <code>s</code>, find the length of the <strong>longest substring</strong> without repeating characters.</p>
<p><strong>Example 1:</strong></p>
<p><strong>Input:</strong> s = "abcabcbb" <strong>Output:</strong> 3 <strong>Explanation:</strong> The answer is "abc",
with the length of 3.</p>
<p><strong>Example 2:</strong></p>
<p><strong>Input:</strong> s = "bbbbb" <strong>Output:</strong> 1 <strong>Explanation:</strong> The answer is "b", with
the length of 1.</p>
<p><strong>Example 3:</strong></p>
<p><strong>Input:</strong> s = "pwwkew" <strong>Output:</strong> 3 <strong>Explanation:</strong> The answer is "wke",
with the length of 3. Notice that the answer must be a substring, "pwke" is a subsequence and not a substring.</p>
<p><strong>Example 4:</strong></p>
<p><strong>Input:</strong> s = "" <strong>Output:</strong> 0</p>
<p><strong>Constraints:</strong></p>
<ul>
<li><code>0 <= s.length <= 5 * 104</code></li>
<li><code>s</code> consists of English letters, digits, symbols and spaces.</li>
</ul>
<p><a class="btn" href="https://leetcode.com/problems/longest-substring-without-repeating-characters/">Source</a></p>
</body>
</html>