okay, this is not exactly a but I hope you hate this problem as much as I did...

The problem is not just getting the right solution, but getting it in under the running timeout of 12000 ms. Good luck.

codewars.com/kata/54d81488b981

@Absinthe getting it under 12 seconds if the list is small is trivial, doing it on large enough lists might get tricky but to make the challenge useful youd have to specify the list of numbers that must be worked in under 12 seconds.

Obviously this also assume we all do the task on relatively similarly powered computers.

@freemo They don't tell you that you have to do it in any particular time or space. It is a bad challenge form that part. When you start there are a few tests that you run. Then when you think you are happy and submit it, it runs against more tests. Some of them are over a million long with the numbers being at the beginning and end, and also in the middle. I did put a link in for the actual problem. It has a ui and a working compiling and testing environment. I had the logic solved dead on, but couldn't be certain until I got it efficient enough to go through the big blind tests without timing out. You get very little feedback on a timeout :)

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.