Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- object Solution {
- def solution(A: Array[Int]): Int = {
- val N = A.size
- if (N < 1 || N > 1000000) sys.error(s"Invalid array size: $N")
- A.foldLeft(0) { (current, i) =>
- i ^ current
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement