• + 0 comments

    It's O(1) time(for each query) and O(n) space, not the other way around.