Skip to content

Instantly share code, notes, and snippets.

@azpat
Created October 14, 2013 19:26
Show Gist options
  • Select an option

  • Save azpat/6980692 to your computer and use it in GitHub Desktop.

Select an option

Save azpat/6980692 to your computer and use it in GitHub Desktop.
$global:freqtable=@{}
function atothebv($a, $b, $v){
if ($b -eq 0){$global:sum+=1; write-host $v; $global:freqtable[$v]+=1;return}
for ($i=1; $i -le $a; $i++){atothebv $a ($b-1) ($v+$i) }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment