Powershell — 3 Cmdlets Hackerrank Solution //top\\

$lines = @($input) $n = [int]$lines[0] $matrix = $lines[1..$n] | ForEach-Object ,([int[]]($_.Trim() -split ' '))

$data | Where-Object $_.YearsOfExperience -ge 2 powershell 3 cmdlets hackerrank solution

: Use Where-Object (or the ? alias) to reduce the object count in the pipeline. $lines = @($input) $n = [int]$lines[0] $matrix = $lines[1