Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions solution/0200-0299/0238.Product of Array Except Self/README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,3 +267,16 @@ function productExceptSelf(nums: number[]): number[] {
<!-- solution:end -->

<!-- problem:end -->

#### Java

```java
class Solution {
public int[] productExceptSelf(int[] nums) {
return IntStream.range(0, nums.length)
.map(i -> IntStream.range(0, nums.length)
.reduce(1, (p, j) -> j == i ? p : p * nums[j]))
.toArray();
}
}
```