- 0of 0 votes
Implement a single-word division:- pavel.em December 23, 2011 in United States
i.e., you are given a long integer X having 'n' limbs (32-bit words) and you need to divide X by another 32-bit int 'b'
optimize your solution for time. Can you do this better if you know that 'b' divides 'X' exactly ?
what if 32-bit division on the target architecture is expensive ? try to minimize the # of integer '/' and '%' ops (e.g., using floating-point tricks)
| Report Duplicate | Flag | PURGE