PayPal Interview Question

Find the longest substring that does not contain any duplicate characters.

Interview Answers

Anonymous

Sep 2, 2020

Used hashmaps

Anonymous

Apr 28, 2021

def longest_without_duplicates(st): n=len(st) if n<=1: return st _max=1 p0=-1 p1=-1 letters=set() unvalid_letter=None while p0