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.
Time measurement confirms my hypothesis:
divisors1 4.6103479569997035
divisors3 4.21220756699995
divisors4 4.539421095999842
divisors5 3.7151190190002126
Insert is O(n) (because we have to shift every element after insertion point), so total runtime for list construction will be O(n*n), where n is number of factors. Sort, on the other hand, should be O(n*log(n)), which is asymptotically faster.
This is just broken now. Attempt throws warnings, which are treated as error:
/tmp/haskell117915-5-e9kr75.ud1rc9dx6r/IPv4/Test.hs:13:17: Warning:
Literal 2154959208 is out of the Int32 range -2147483648..2147483647
/tmp/haskell117915-5-e9kr75.ud1rc9dx6r/IPv4/Test.hs:15:17: Warning:
Literal 2149583361 is out of the Int```