double based number code help..
i would like to know how to use a binary search tree to find the optimal double base representation of a decimal number
for eg with bases 2 n 3
my algorithm to find the optimal double base representation of a number N using recursion is:
step 1 : find the highest power combination, C, of 2 & 3 which is closest to N
step 2 : subtract C from N to get a difference D
step 3 : repeat step 1 with D inplace of N
my question is how can i use a binary tree/binary search with this algoritm..
i just need the theory(ie "funda") behind it...the code ill write myself..
thanks for readin!
|All times are GMT +5.5. The time now is 02:23.|