Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
A true software engineer.
I would only call this super simple if you are well versed in regular expressions. To me, it might as well be in French.
Thanks guys, was a first attempt :)
I'd be inclined to agree if he uses === instead of ==
Inefficient searching is never a best practice.
This comment is hidden because it contains spoiler information about the solution
This is pretty genius. Admittedly, it took me a while to figure out the approach you took here. But once it clicked, I realized how nice this is.
Nice job!
This comment is hidden because it contains spoiler information about the solution
No, it's not. Don't do it
This comment is hidden because it contains spoiler information about the solution
this solution seems to break in one of my tests.
a1 = [121,None,144, 19,161,19,144,19,11]
a2 = [11 * 11, 121 * 121, 144 * 144, 19 * 19, 161 * 161, 19 * 19, 144 * 144, 19 * 19]
self.assertFalse(comp(a1,a2))
and
a1 = [121,144, 19,161,19,144,19,11]
a2 = [11 * 11, None]
self.assertFalse(comp(a1,a2))
I was definitely going to say "This iterates through 4 times!" but then read the comments.
Definitely a good point that the list would only need to be lenght 10 to be valid in the first place.
So definitely think this is both clever and best practices.
Learn something new every day.
I'm wondering if the for loop can be optimized a bit more. At least for readability.
This comment is hidden because it contains spoiler information about the solution
Had a feeling there'd be an algorithm for this. Didn't spend enough time looking :(
Gonna fork and play around with this a bit. See if I can understand the rounding and significant digits stuff.
Loading more items...