Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Write a method to find the common elements in three arrays.

Medium

Problem Statement

Write a method to find the common elements in three arrays.

Sample Input

[1, 2, 3], [2, 3, 4], [3, 4, 5]

Sample Output

[3]

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
# Predefined arrays array1 = [1, 2, 3] array2 = [2, 3, 4] array3 = [3, 4, 5] # Your logic here
Log in or sign up to run or submit your code.Log inSign up
Input
[1, 2, 3], [2, 3, 4], [3, 4, 5]
Expected Output
[3]