cs: add «3151. Special Array I»
URL: https://leetcode.com/problems/special-array-i/ Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
parent
1a3709064d
commit
1e2d16c0d5
1 changed files with 4 additions and 0 deletions
4
cs/special-array-i.cs
Normal file
4
cs/special-array-i.cs
Normal file
|
@ -0,0 +1,4 @@
|
|||
public class Solution {
|
||||
public bool IsArraySpecial(int[] nums)
|
||||
=> nums.Zip(nums.Skip(1)).All(p => (p.First & 1) != (p.Second & 1));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue