dev icon indicating copy to clipboard operation
dev copied to clipboard

Space complexity mismatch in Space Edition!

Open AkshayGosree opened this issue 8 years ago • 0 comments

https://github.com/danialgoodwin/dev/blob/e65e91cb5df8d63e2c1a24a692c506b64858228b/code-practice/interview-cake/src/com/danialgoodwin/interviewcake/question/FindDuplicateOptimizeForSpace.java#L52

This code will internally call the legacy merge sort which will take an O(n) space complexity.

So I think your code would take more than O(1) space! :)

AkshayGosree avatar Aug 17 '17 09:08 AkshayGosree