• [deleted]
    + 1 comment

    instead of using unordered_set, it would be quicker with set because unordered_set takes a constant O(1) while set takes O(log n)