I didnt get the idea of minus 2, coz wen base is 2, we use digits 0 and 1, if its base , then digits from 0 to 7 and so on.. so for base -2, which digits go?
On Sun, Jan 29, 2012 at 11:26 PM, Zyro <vivkum...@gmail.com> wrote: > Write a function that takes an integer and returns a char array that > contains the -2 (minus 2) base representation of the given integer. > Example: > Input Output > 7 11011 > 3 111 > 2 110 > > Plzzz help.... ??? > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- Regards Anika Jain -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.