Gemini Interview Question

Write a program to return the common numbers between 2 lists

Interview Answer

Anonymous

Apr 6, 2022

Use python sets and the intersection to return the common values. Alternatively you can use a for loops and explain your thinking. In all questions be sure to clarify any ambiguous requirements. In this questions you should ask if the interviewer wants duplicate values returned or not. If they want duplicate values returned you could not use the set and intersection method,