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

  Рет қаралды 4,587

Greg Hogg

Greg Hogg

4 ай бұрын

The Python code for this problem can be found at my GitHub repo here: github.com/gahogg/Leetcode-So...
Please check my playlists for free DSA problem solutions:
• Array & String Questions
• 2 Pointers Questions
• Sliding Window Questions
• Binary Search Questions
• Stack Questions
• Linked List Questions
• Tree Questions
• Heap Questions
• Recursive Backtracking...
• Graph Questions
• Dynamic Programming (D...
Learn Python and Data Science at mlnow.ai :)
Best Courses for Analytics:
---------------------------------------------------------------------------------------------------------
+ IBM Data Science (Python): bit.ly/3Rn00ZA
+ Google Analytics (R): bit.ly/3cPikLQ
+ SQL Basics: bit.ly/3Bd9nFu
Best Courses for Programming:
---------------------------------------------------------------------------------------------------------
+ Data Science in R: bit.ly/3RhvfFp
+ Python for Everybody: bit.ly/3ARQ1Ei
+ Data Structures & Algorithms: bit.ly/3CYR6wR
Best Courses for Machine Learning:
---------------------------------------------------------------------------------------------------------
+ Math Prerequisites: bit.ly/3ASUtTi
+ Machine Learning: bit.ly/3d1QATT
+ Deep Learning: bit.ly/3KPfint
+ ML Ops: bit.ly/3AWRrxE
Best Courses for Statistics:
---------------------------------------------------------------------------------------------------------
+ Introduction to Statistics: bit.ly/3QkEgvM
+ Statistics with Python: bit.ly/3BfwejF
+ Statistics with R: bit.ly/3QkicBJ
Best Courses for Big Data:
---------------------------------------------------------------------------------------------------------
+ Google Cloud Data Engineering: bit.ly/3RjHJw6
+ AWS Data Science: bit.ly/3TKnoBS
+ Big Data Specialization: bit.ly/3ANqSut
More Courses:
---------------------------------------------------------------------------------------------------------
+ Tableau: bit.ly/3q966AN
+ Excel: bit.ly/3RBxind
+ Computer Vision: bit.ly/3esxVS5
+ Natural Language Processing: bit.ly/3edXAgW
+ IBM Dev Ops: bit.ly/3RlVKt2
+ IBM Full Stack Cloud: bit.ly/3x0pOm6
+ Object Oriented Programming (Java): bit.ly/3Bfjn0K
+ TensorFlow Advanced Techniques: bit.ly/3BePQV2
+ TensorFlow Data and Deployment: bit.ly/3BbC5Xb
+ Generative Adversarial Networks / GANs (PyTorch): bit.ly/3RHQiRj
Become a Member of the Channel! bit.ly/3oOMrVH
Follow me on LinkedIn! / greghogg
Full Disclosure:
Please note that I may earn a commission for purchases made at the above sites! I strongly believe in the material provided; I only recommend what I truly think is great. If you do choose to make purchases through these links; thank you for supporting the channel, it helps me make more free content like this!

Пікірлер: 14
@kashinathpatekar9870
@kashinathpatekar9870 4 ай бұрын
Technically the size of the set will be limited by the character set used, so can we call it O(1) space?
@GregHogg
@GregHogg 4 ай бұрын
Oops did I say O(n) space? You're completely correct, yes!
@kashinathpatekar9870
@kashinathpatekar9870 4 ай бұрын
Thanks for clarifying!
@foudilbenouci482
@foudilbenouci482 Ай бұрын
more exactly O(n/c) where c is the capacity of the character set used and n the size of the string
@HelicopterRidesForCommunists
@HelicopterRidesForCommunists 10 күн бұрын
Best solution Ive seen. Nice!
@pumpkinp6906
@pumpkinp6906 4 ай бұрын
Great explanation ! It would be great if you would share the leetcode problem link in description so that we can implement ourselves after learning
@DamosyTheFreckle
@DamosyTheFreckle Ай бұрын
Good explanation, thank you!
@middle-agedclimber
@middle-agedclimber Ай бұрын
Best solution I've seen. Thanks
@HelicopterRidesForCommunists
@HelicopterRidesForCommunists 10 күн бұрын
lol thats literally what I said. Best explanation too.
@rajarshibiswas9424
@rajarshibiswas9424 Ай бұрын
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??
@yuasufhelal7181
@yuasufhelal7181 8 күн бұрын
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.
@ParaSteve1985
@ParaSteve1985 4 ай бұрын
Hi there, are you still available for 1o1 trainings sessions?
@GregHogg
@GregHogg 4 ай бұрын
Yes, please email greg.hogg1@outlook.com
@ParaSteve1985
@ParaSteve1985 4 ай бұрын
@@GregHogg done, waiting for your reply.
100❤️
00:19
MY💝No War🤝
Рет қаралды 23 МЛН
마시멜로우로 체감되는 요즘 물가
00:20
진영민yeongmin
Рет қаралды 32 МЛН
KINDNESS ALWAYS COME BACK
00:59
dednahype
Рет қаралды 165 МЛН
Leetcode 3. Longest Substring Without Repeating Characters
15:49
Code with Alisha
Рет қаралды 63 М.
Top K Frequent Elements - Leetcode 347 - Heaps (Python)
14:08
Greg Hogg
Рет қаралды 4,4 М.
Number of Islands - Leetcode 200 - Graphs (Python)
11:01
Greg Hogg
Рет қаралды 2,7 М.
Subsets - Leetcode 78 - Recursive Backtracking (Python)
11:51
Greg Hogg
Рет қаралды 3,1 М.
How I would learn Leetcode if I could start over
18:03
NeetCodeIO
Рет қаралды 357 М.
100❤️
00:19
MY💝No War🤝
Рет қаралды 23 МЛН