LeetCode Unique Email Addresses Solution Explained - Java
Vložit
- čas přidán 7. 03. 2019
- The Best Place To Learn Anything Coding Related - bit.ly/3MFZLIZ
Join my free exclusive community built to empower programmers! - www.skool.com/software-develo...
Preparing For Your Coding Interviews? Use These Resources
--------------------
(My Course) Data Structures & Algorithms for Coding Interviews - thedailybyte.dev/courses/nick
AlgoCademy - algocademy.com/?referral=nick...
Daily Coding Interview Questions - bit.ly/3xw1Sqz
10% Off Of The Best Web Hosting! - hostinger.com/nickwhite
Follow My Twitter - / nicholaswwhite
Follow My Instagram - / nickwwhite
Other Social Media
----------------------------------------------
Discord - / discord
Twitch - / nickwhitettv
TikTok - / nickwhitetiktok
LinkedIn - / nicholas-w-white
Show Support
------------------------------------------------------------------------------
Patreon - / nick_white
PayPal - paypal.me/nickwwhite?locale.x...
Become A Member - / @nickwhite
#coding #programming #softwareengineering - Věda a technologie
Shouldn't it be String domain_name = email.substring(split_position +1) to start ahead of the '@'? It did not make a difference though, apparently.
Nice explanation
thanks for watching dude
At line 11 where you do .contains and then .indexOf, you're scanning the string twice. Instead you can just do the indexOf and if it's not -1 then do the substring on that index. That should be slightly better perf in those cases.
yeah technically but the time complexity wouldn't change, so an interviewer wouldn't care
too much of inner loops ?