Ad
  • Custom User Avatar

    Sorted. I'll leave the original post for others who have the same problem:
    It's not the tests or the server - my first try was not efficient enough.

  • Custom User Avatar

    Hello. Doing this in Haskell. I pass the tests but when I try to submit, I get:
    "Main.hs: out of memory (requested 1048576 bytes)
    0 Passed
    0 Failed
    0 Errors
    Process took 5220ms to complete"
    Just to see whether it's my algorithm I have tried adding a guard that returns [] if the requested list is greater than a certain length.
    If I don't allow the list to be at least 10 elements long I don't pass the initial tests, but returning [] when an 11-element list is requested still causes this failure.
    Locally with ghci there is no problem executing this solution up to reasonably large values of n (got bored at 10000).
    Thanks for any advice.