Skip to content

Commit 3467382

Browse files
committed
Runtime: 0 ms (Top 100.0%) | Memory: 2.30 MB (Top 14.71%)
1 parent 3f8149b commit 3467382

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Runtime: 0 ms (Top 100.0%) | Memory: 2.30 MB (Top 14.71%)
2+
3+
impl Solution {
4+
pub fn array_sign(nums: Vec<i32>) -> i32 {
5+
nums.iter().fold(1, |prod, &x| prod * x.signum())
6+
}
7+
}

0 commit comments

Comments
 (0)