Linear time - very demanding tests, VERY demanding tests, considering you want to prohibit sorting.
Constant space - I think it's... impossible? In languages without memory management at least.
Nope, it is your (the kata author's) job to reject any solutions you dont want them to pass by your test code.
Otherwise, any solutions that pass are perfect.
That's what I thought and that's why I didn't actively test it. Sorry for taking your time :)
Linear time - very demanding tests, VERY demanding tests, considering you want to prohibit sorting.
Constant space - I think it's... impossible? In languages without memory management at least.
Is there any way to test it ? (If no, i'll just unpublish the kata since it's mostly for people that I know)
This is not tested.
Either test it, or take it out of the description.
Ok.
Nope, it is your (the kata author's) job to reject any solutions you dont want them to pass by your test code.
Otherwise, any solutions that pass are perfect.
Sadly not
O(n)
in time because of the sort.Sadly not
O(n)
in time because of the sort.