Complexity Based Efficiency Tests #2992
felipesantoz
started this conversation in
General
Replies: 1 comment 6 replies
-
Looks like you missed them: search for |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It's a common coding challenge to be given an upper bound on the time complexity of a solution. A classic example is to write a sorting algorithm which runs in time
O(nlogn)
, to which an implementation of merge sort is a valid solution, but of insertion sort is invalid, as it runs in timeO(n^2)
. However, I've yet to come across this type of problem on Codewars.It is of course undecidable to check the time complexity of an algorithm, but there are empirical means of testing it with a negligible probability for error. So, I wanted to discuss this. Do these types of problems already exist on Codewars and I just missed them? If they don't yet exist, why not?
Beta Was this translation helpful? Give feedback.
All reactions