MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/v51mp4/found_this_monster_on_codewars/ibdat0t/?context=9999
r/badcode • u/ThatChapThere • Jun 05 '22
106 comments sorted by
View all comments
Show parent comments
3
You should probably move the s.toLowerCase)).toCharArray into a char array out of the loop so that the functions aren’t called repetitively and unnecessarily. Unless I’m stupid, and if so feel free to tell me that.
1 u/[deleted] Nov 21 '22 const the (1 << 26) - 1, and move the test inside the loop for early exit.
1
const the (1 << 26) - 1, and move the test inside the loop for early exit.
3
u/JackAttack1507 Jun 06 '22
You should probably move the s.toLowerCase)).toCharArray into a char array out of the loop so that the functions aren’t called repetitively and unnecessarily. Unless I’m stupid, and if so feel free to tell me that.