• ###### kan_acommented on "Unlucky Days" javascript solution

Thank You! Glad to see in codewars someone concerns about efficiency.
It is even possible to determine the day of the week for 1 January without `new Date()`.

P.S. Sometimes I do much stranger things...

• ###### prsmithcommented on "Unlucky Days" javascript solution

Doing this math in milliseconds is a super bad idea, and completely unnecessary.

• ###### prsmithcommented on "Unlucky Days" javascript solution

You could have used lodash's range() method generate the months array and turn this into a one liner.

• ###### prsmithcommented on "Unlucky Days" javascript solution

Pretty efficient except for one line:
new Date(String(year))

This would be more efficient as:
new Date(year, 0)

• ###### prsmithcommented on "Unlucky Days" javascript solution

Mixing let and var is not "best practice".

• ###### prsmithcommented on "Unlucky Days" javascript solution

Mixing let and var is not "best practice".

• ###### Barnabcommented on "Edge-edges" kumite

Woops, sloppy! Thanks :)

• ###### MasterMaxLennonKrollcommented on "Artemas's Java solution for "Remove String Spaces"" kumite

I just learned the join method, so I decidied it would be cool to use it in this problem. Thank you for your help :]

• ###### prsmithcommented on "Artemas's Java solution for "Remove String Spaces"" kumite

Split/Join is significantly less efficient than replace.

• ###### prsmithcommented on "Vowel Count" java solution

Always use curly braces on if statements for readability and maintainability.

• ###### prsmithcommented on "Vowel Count" java solution

toCharArray() creates a copy of the string. You should always avoid this method.

• ###### prsmithcommented on "Calculate String Rotation" java solution

Do not use toCharArray(), it causes the string to be copied, where a copy is not necessary.

• ###### prsmithcommented on "Enumerable Magic #25 - Take the First N Elements" java solution

n >= arr.length

• ###### prsmithcommented on "Anagram Detection" java solution

Doesn't work for all test cases.

• ###### prsmithcreated an issue for "Remove duplicate words" kata

Needs a test case where some words are a substring of previous words.

Example: "starborn star"