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.
Did you read the description?
Typesript:
expected [ 'live', 'strong', 'arp' ] to deeply equal [ 'arp', 'live', 'strong' ]
Why order is important? How you give, so it return.
Hi - your current approach is basically a brute force search (it is trying all possible combinations of subarrays effectively), so it will indeed get the correct solution.
However, the large random tests involve
lists
with up to50,000
elements - if you perform the brute force approach you will therefore need to perform50,000 ** 2
operations approximately, for each test, which is a huge number.That's why you are timing out; your solution is correct, but inefficient.
To answer your question for advice about this; you cannot really speed up your current brute force approach - instead, you need to reduce the time complexity from O(n^2) to something less than O(n^2).
I have the same problem as @eshis with python, everything seems to work excluding last random test.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Thanks for review + Github update
Thanks! It's working!
using System.Collections.Generic;
maybe?What are "using" have I missed? I tried: System, System.Linq, NUnit.Framework. But that didn't solve my problem.
.
Hello! Have some problem in C# language:
error CS0246: The type or namespace name 'List<>' could not be found (are you missing a using directive or an assembly reference?)