Skip to content

Instantly share code, notes, and snippets.

@lbvf50mobile
Created January 17, 2025 11:29
Show Gist options
  • Save lbvf50mobile/384cc793dabaa443ed04fac91c5319e2 to your computer and use it in GitHub Desktop.
Save lbvf50mobile/384cc793dabaa443ed04fac91c5319e2 to your computer and use it in GitHub Desktop.
Leetcode: 2683. Neighboring Bitwise XOR
// Leetcode: 2683. Neighboring Bitwise XOR
// https://leetcode.com/problems/neighboring-bitwise-xor/description/
// = = = = = = = = = = = = = =
// Accepted.
// Thanks God, Jesus Christ!
// = = = = = = = = = = = = = =
// Runtime: 0 ms Beats 100.00%
// Memory: 13.31 MB Beats 11.11%
// 2025.01.17 Daily Challenge.
package main
import (
// "fmt"
)
func doesValidArrayExist(derived []int) bool {
sum := 0
for _, v := range derived {
sum ^= v
}
return 0 == sum
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment