https://leetcode.com/problems/two-out-of-three/


Runtime: 109 ms, faster than 70.00% of TypeScript online submissions for Two Out of Three.

Memory Usage: 46.2 MB, less than 30.00% of TypeScript online submissions for Two Out of Three.


```typescript
function twoOutOfThree(nums1: number[], nums2: number[], nums3: number[]): number[] {
    //8:02
    let big_list = new Set([...nums1, ...nums2, ...nums3])
    let result_list = []
    for (const value of big_list) {
        let a = nums1.includes(value)
        let b = nums2.includes(value)
        let c = nums3.includes(value)
        if ((a && b) || (a && c) || (b && c)) {
            result_list.push(value)
        }
    }
    return result_list
    //8:06
};
```
