Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit bcd77f6

Browse files
authored
Update and rename Missing Numbers.java to Missing Number.java
1 parent a61b451 commit bcd77f6

File tree

2 files changed

+6
-21
lines changed

2 files changed

+6
-21
lines changed

Easy/Missing Number.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class Solution {
2+
public int missingNumber(int[] nums) {
3+
return (nums.length * (nums.length + 1) / 2) - Arrays.stream(nums).boxed()
4+
.reduce(0, Integer::sum);
5+
}
6+
}

Easy/Missing Numbers.java

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)