how can that array be constructed efficiently? convert binary to that
base?
On Sep 27, 4:02 am, MD <[EMAIL PROTECTED]> wrote:
> If we have enough memory.. we could probably have a array to hold
> values for
> numbers in each base and sum it and output the value.. :) efficiency
> at the cost of me
If we have enough memory.. we could probably have a array to hold
values for
numbers in each base and sum it and output the value.. :) efficiency
at the cost of memory.
On Sep 25, 5:12 pm, Mgccl <[EMAIL PROTECTED]> wrote:
> is there a known, efficient digit sum algorithm exist for any base.
> In
The only algorithm I'm aware of is :
digitsum(N,base) :
sum = 0
while N != 0
sum = N % base
N = N / base
return sum
which obviously isn't efficient.
On Sep 26, 2:12 am, Mgccl <[EMAIL PROTECTED]> wrote:
> is there a known, efficient digit sum algorithm exist for any base.