Python
All Top Python Interview Questions#6
Fast Deduplication and Set Operations in Python
EasyInterview Question #6
Given two lists of customer IDs representing visitors to Campaign A and Campaign B, find all customers who visited both campaigns. Explain the time complexity versus nested loops.
Input Table: campaigns
1 rows preview| campaigns |
|---|
| [object Object] |
Expected Output Structure1 rows
| both_campaigns |
|---|
| 103,104 |
Interview Context
Asked frequently in data analyst and business analyst technical rounds. Focus on clean filtering, optimal indexing usage, and unambiguous column selection.
Python 3.10 (Pandas)
Environment Ready
Starting the real Python + pandas runtime (one-time download)…