Skip to content

Commit

Permalink
GO: 136. Single Number
Browse files Browse the repository at this point in the history
  • Loading branch information
MaratKhakim committed Jul 28, 2022
1 parent 6848691 commit c3545d3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions go/136-Single-Number.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
func singleNumber(nums []int) int {
res := 0

for _, num := range nums {
res ^= num
}

return res
}

0 comments on commit c3545d3

Please sign in to comment.