Sollicitatievraag bij Qualcomm

Basic bit manipulation question, with a dynamic programming twist.