text: total ways = ( ways by placing 1 st bit as 1 + ways by placing 1 st bit as 0 )
code: $ totalWays = waysToKAdjacentSetBits ( $ n , $ k , 1 , 0 , 1 ) + waysToKAdjacentSetBits ( $ n , $ k , 1 , 0 , 0 ) ; echo " Number ▁ of ▁ ways ▁ = ▁ " , $ totalWays , " STRNEWLINE " ; ? >