Short and sweet, but not best practices. I think this is a cute and clever solution for a simple string, but not efficient if the input was 100s or 1000s of characters long. I'd prefer a solution that returned false as soon as a lowercase character was found. In this case this solution is O(n) yet always the worst case, meaning that it always has to reach the last item (ALL characters must be uppercased) before it can determine the boolean value. This is more of a JS like solution than an Elixir solution. Elixir has better "tools" for working with strings.
Well, even though I fix the little problem which comes from your confusing description, the code does not compile and gives an error (based on a warning) and then I cannot even submit my solution.
You should fix this.
/home/codewarrior/src/main/java/TestT.java:184: warning: non-varargs call of varargs method with inexact argument type for last parameter;
Short and sweet, but not best practices. I think this is a cute and clever solution for a simple string, but not efficient if the input was 100s or 1000s of characters long. I'd prefer a solution that returned false as soon as a lowercase character was found. In this case this solution is O(n) yet always the worst case, meaning that it always has to reach the last item (ALL characters must be uppercased) before it can determine the boolean value. This is more of a JS like solution than an Elixir solution. Elixir has better "tools" for working with strings.
This comment is hidden because it contains spoiler information about the solution
This is very clever!!!
This comment is hidden because it contains spoiler information about the solution
This recursive call after both strings are already processed is not a very performance-wise thing
if(f2.length < s2.length)
return interlacing(s2, f2);
this O(logN)
its kata can be solved O(N)
still issue
Works now. Thanks.
Elixir translation lacks of sample test cases and/or a proper description. Without them I have no idea what to do.
Thank you since codewars java runner was refactored now it fails on any warning. Please retry.
Well, even though I fix the little problem which comes from your confusing description, the code does not compile and gives an error (based on a warning) and then I cannot even submit my solution.
You should fix this.
Please retry solution is not correct
This comment is hidden because it contains spoiler information about the solution
Funny, man))
Yes, that's true :) I have no idea why it arrived there but I guess it remained after refactoring the code.
Loading more items...