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 thought about the for loop. I was just too lazy to implement it after the while loop worked.
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.
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))
Good point. I'd rather see it outside of the loop.
yeah, you can use additional array or just sort. Also you can try not sqrt(N), but 2 * (cubed root of N). As i remember it also will work.