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.
As a new user who only joined 2 days ago, I appreciate the explanation. Your toxicity, however, was entirely superfluous. Thanks.
Actually, it is. There's a reason why every IT student has to take math classes. Try to understand Machine Learning without Statistics, or Image Processing without Analysis, or Computer Graphics without Linear Algebra. Without at least some basic maths, you'll be lost as soon as your solution doesn't work, or when you have to implement something non-standard.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
colors
could be an array instead.@Chrono79
Is that really necessary? If you can read my comment, you already know the solution it contains. Am I missing something?
This code is very slow for large arrays. You could easily fix this by checking for
walk.length === 10
before executing all thefilter
s.This comment is hidden because it contains spoiler information about the solution
But only when the array has 10 elements, so it's technically still O(1).
Hint: the values of
a1
anda2
are not necessarily in the same order.If
$a1 == [1, 1, 1]
and$a2 == [1, 2, 3]
, your code will returntrue
, when it should befalse
.