$aliceScore = 0 $bobScore = 0 0..2 | ForEach-Object if ($a[$] -gt $b[$]) $aliceScore++ elseif ($b[$] -gt $a[$]) $bobScore++
Write-Output "$aliceScore $bobScore"
Cmdlets used: -split, ForEach-Object, Write-Output. powershell 3 cmdlets hackerrank solution
You are given a list of running processes.
Write a PowerShell script that: $aliceScore = 0
$bobScore = 0
0
Sorts by one or more properties.
$data | Sort-Object Salary -Descending
# Template.ps1
param()