Answer: KIKO LIVE Hiring | Online Assessment Question | On-Campus (2025)

Answer · Posted Jun 2026

Approach Store all distinct elements of both arrays in two HashSets. Traverse the first set: If an element is not present in the second set, XOR it with xor1. Traverse the second set: If an element is not present in the first set, XOR it with xor2. Return both XOR values. Strategy Use HashSet to remove duplicate elements. Compare both sets to identify unique elements. Use the XOR operator (^) to compute the required values. Java Code import java.util.*; class ...

The full answer & interview discussion are available to premium members.

Log in Create a free account