Skip to content

Tag: time-complexity

TapeEquilibrium, Solution Failing Two Edge Cases

Currently working on problems from codility for practice, and for some reason I’m unable to get more than 83% correctness overall, originally I solved it with 100% correctness but with N^2 time complexity (it needs to be N or lower) I’ve adjusted my code to be able to solve in O(N) but now my corr…

Analysis of run time complexity

I need some help below I have some code I created for an assignment. I am having a hard time figuring out the time complexity of this algorithm. I looked at it and believe the O-notation is 0(n) and …