codemistic / Data-Structures-and-Algorithms

A repository to help the open-source community with DSA related contributions
MIT License
345 stars 341 forks source link

Long_Substr_w/o_Repeat_Char #524

Closed priyayadav19054 closed 1 year ago

priyayadav19054 commented 1 year ago

Given a string s, find the length of the longest substring without repeating characters. The idea is checking whenever we find any letter which is repeating we can find previous position and find the difference we can check "repeating" by maintain hash functions like map