Output a binary path from a number – codegolf.stackexchange.com

For an integer n that satisfies n > 0, write its value as a right-descending path based on its binary representation.

Rules
The first (most significant) set bit is always in the top-left corner.

For Get Answer – Click here

Leave a Reply

Your email address will not be published. Required fields are marked *