LeetCode Unique Email Addresses Solution Explained – Java

LeetCode Unique Email Addresses Solution Explained – Java

FOLLOW ME BELOW

Patreon – https://www.patreon.com/nick_white?al…
Twitch – https://www.twitch.tv/matrixman
Reddit – https://www.reddit.com/r/NickWhiteCod…
Twitter – https://twitter.com/nickdoubleyouu
Instagram – https://instagram.com/nickdoubleyou
Linkedin – https://www.linkedin.com/in/nicholas-…
Github – https://github.com/white105
Discord – https://discordapp.com/invite/vQH4vSJ
Soundcloud – https://soundcloud.com/nickiswhite

3 Comments

  1. faizan khan on January 29, 2021 at 2:31 am

    too much of inner loops ?



  2. SirBudrick on January 29, 2021 at 2:41 am

    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.



  3. Kemal Gülpınar on January 29, 2021 at 3:02 am

    Nice explanation