![]() ![]() ![]() AFter extracting that bit value, convert it to its string value by doing some ascii math/whatever, and then prepend it on to the string. This will continually extract the rightmost bit (LSB) in the integer. Continually do a bitwise AND with the number and 1 and right shift the number by 1 after each and. ![]() Make a blank string variable which will contain the string. The way I see it, there are three different ways to do this: ("N" refers to the number to convert below) So this was involved in an interview question I was practicing with. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |