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

Programming Exercises

Check if two arrays are identical (same elements in the same order).

Medium

Problem Statement

Check if two arrays are identical (same elements in the same order).

Sample Input

[1, 2, 3], [1, 2, 3]

Sample Output

true

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
import java.util.*; public class Main { public static boolean areIdentical() { int[] arr1 = {1, 2, 3}; int[] arr2 = {1, 2, 3}; // Your code here return false; } }
Log in or sign up to run or submit your code.Log inSign up
Input
[1, 2, 3], [1, 2, 3]
Expected Output
true