i submitted the answer using hashtable O(n) and it accepted which it should not have accepted..admin have a look
Here the input array have already cost O(n), so another O(n) extra space doesn't signify.
Best solution is not always required to be accepted. (and less space and time doesn't always means best)
There is no way to detect whether it's constant space or not.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.