Skip to content

Commit

Permalink
[LC-0136] Single Number
Browse files Browse the repository at this point in the history
Add java solution for leetcode problem 136 - Single Number
  • Loading branch information
galaumang committed May 8, 2023
1 parent ac4ba8c commit 41677f3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions solutions-java/src/main/java/dsalgo/leetcode/SingleNumber.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package dsalgo.leetcode;

public class SingleNumber {
public int singleNumber(int[] nums) {
int no = 0;
for (int num : nums) {
no ^= num;
}
return no;
}
}

0 comments on commit 41677f3

Please sign in to comment.