No set, sort, or hashmap: use Masks
Intuition\n Describe your first thoughts on how to solve this problem. \n It\'s highlighted that the integers in each sublist are distinct.\n The result must be
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n* It\'s highlighted that the integers in each sublist are **distinct**.\n* The result must be sorted in ascending order.\n    * I think the point is to build your result in a way that it turns out to be ascending.\n    * Not that you build however and finally sort it!\n* Use the constraint: `1 <= nums[i] <= 1000`\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n* For each sublist create a `mask`\n* `mask` is an integer.\n* See it as an array of bits.\n\t* 0-indexed from the right.\n* The length of this array is limited by the range of elements in each sublist of `nums`.\n\t* In this particular problem, `mask` can be, atmost, an array of 1000 bits.\n\t\t* Now that could be a pretty large number. But Python can handle arbitrarily large numbers!\n* Let `arr` be a sublist of `nums`\n* For each `n` in `arr`\n\t* Set the `n-1`-th bit from the right.\t    \n\t    * The right-most bit is the `0`-th bit.\n\t    * When we "set a bit", we mean we set it to `1`.\n\n* Take the intersection of all these masks.\n* The bits that are set in `intersection` correspond to the desired numbers that are common in all the sublists.\n* Iterate over each bit in `intersection` to check if the bit is set or not.\n    * If set, add the corresponding element to the result.\n\n\n# Complexity\n- Time complexity: `O(n)`, where `n = len(nums)`\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: `O(n)`, where `n = len(nums)`\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution:\n    def intersection(self, nums: List[List[int]]) -> List[int]:\n        minVal = 1                \n        \n        def generateMask(arr):\n            mask = 0\n            for n in arr:\n                mask |= (1 << (n - minVal))\n            return mask\n\n        intersection = reduce(lambda x, y: x & y, map(generateMask, nums))\n\n        result = []\n        ele = 0\n        while intersection:\n            if intersection & 1:\n                result.append(ele + minVal)\n            intersection >>= 1\n            ele += 1\n\n        return result\n```
['Bit Manipulation', 'Python3']