.. _leetcode-0003:
================================================================
:badge:`MEDIUM,badge-warning` 0003. Longest Substring Without Repeating Characters
================================================================
-------------------------
Problem Statement
-------------------------
`Leetcode Link `_
--------------------------
Examples
--------------------------
---------------------
Solution
---------------------
.. tab:: O(N^2) Time and O(N) Space complexity
.. literalinclude:: solution_1.py
:caption: Solution
:linenos:
:language: python
.. tab:: Sliding Window Implementation
This implementation uses what is called a
`Sliding Window Iterator `_
This is used when there are problems using a substring.
.. literalinclude:: solution_2.py
:caption: Solution
:linenos:
:language: python