Find unique common element from 3 arrays

前端 未结 7 1682
故里飘歌
故里飘歌 2021-02-03 14:43

Original Problem:
I have 3 boxes each containing 200 coins, given that there is only one person who has made calls from all of the three boxes and thus the

7条回答
  •  我在风中等你
    2021-02-03 15:12

    Use a hash table for each integer and encode the entries such that you know which array it's coming from - then check for the slot which has entries from all 3 arrays. O(n)

提交回复
热议问题