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.
Fix this!
Time.new does not use
require
. It is inbuit.This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Oh, ok.
So that means I need to implement Checking if all elements in the list are INT and if not, to zip out to the main list.
But seems odd that you got this list. Instructions says nothing about this type of list.
I got this combination in one of my previous attemps. This is the problem, that some attemps with my solution are succeed and some are not.
Example when it does not work is in my previous comment.
Because you are using set with list and I believe task required only one list.
The loop will not work with List inside the set, I think this should look diffrent If we want to check if any element inside our list/set is INT.
You should provide only list of Intigers
Why this solution doesn't work with the following combination:
([15, 14, 3, 14, 14, 11, 11, 23, 14, 14, 3, 5, 5, 23, 14, 15, 14, 14, 14, 15, 5, 11, 14, 11, 15, 11, 23, 14, 3, 23, 5, 11, 14],1)
Wait this is illegal! I didn't know you could do that!
I think that due to the level of this Kata this should require you to write your own addition method.
Not declaring you internal variables ( thus them being GLOBAL ) is not a Best Practice.
It's short, but it's pretty slow. The ort fonction has a complexity of O(NlogN), where as you can resolve this is O(N) just by going through the list once and comparing elements two by two.
This comment is hidden because it contains spoiler information about the solution
The only limit is your PC memory
My solution is the same, however I expected it to fail some tests. What if we need for a number to be floating? Working with doubles should be the way here, and i think it was author intention to use them. The level of kata is to high otherwise.
This comment is hidden because it contains spoiler information about the solution
Loading more items...