Meta Interview Question

Find all sub sets of size k from given set

Interview Answer

Anonymous

Jul 11, 2012

> $i) & 1){ $str .= $set[$i] . ' '; } } $str .= ']' . "\n"; echo $str; } function printAllSubsets($set){ $len = pow(2, count($set)); for($i = 0; $i

1