leetcode

1346. Check If N and Its Double Exist

Hash code

Time complexity: O(n)

Space complexity: O(n)

Runtime 2 ms
Beats 94.00% of users with Java

Memory 43.03 MB
Beats 24.50% of users with Java

Binary code

Time complexity: O(n*log(n))

Space complexity: O(1)

Runtime 3 ms
Beats 36.48% of users with Java

Memory 42.76 MB
Beats 49.32% of users with Java