PayPal interview question

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

Interview Answers

Anonymous

2 Sept 2020

Used hashmaps

Anonymous

28 Apr 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