Longest Substring Without Repeating Characters - Leetcode 3 - Sliding Window (Python)

preview_player
Показать описание


Please check my playlists for free DSA problem solutions:

My Favorite Courses:

Data Structures & Algorithms:

Python:

Web Dev / Full Stack:

Cloud Development:

Game Development:

SQL & Data Science:

Machine Learning & AI:
Рекомендации по теме
Комментарии
Автор

Master Data Structures & Algorithms For FREE at AlgoMap.io!

GregHogg
Автор

Great explanation ! It would be great if you would share the leetcode problem link in description so that we can implement ourselves after learning

pumpkinp
Автор

Technically the size of the set will be limited by the character set used, so can we call it O(1) space?

kashinathpatekar
Автор

I have two questions:
1. insted of while loop, why not use if...else
2. after while loop: instead of removing and updating the char in sett, why not add string in sett first and start update "longest"

pravuchaudhary
Автор

set doesnt preserve insertion order. so how removing of elements is working here.?

sumeethraikar
Автор

It's a basic one but please I have question what if we use if s(r) in seen willl it be completely wrong but by what sense. Since you were using while.

yuasufhelal
Автор

i don't know why the code I have written is exactly same instead of set I used hash map should i have used hash set?? is hash map is the main cause of output limit exceeded??

rajarshibiswas
Автор

Hi there, are you still available for 1o1 trainings sessions?

ParaSteve