- **C**
(*http://www.go4expert.com/forums/c/*)

- - **double based number code help..**
(*http://www.go4expert.com/forums/double-based-code-help-t17589/*)

double based number code help..hi ppl!
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 200=(2^7)*3 75=(2*(3^3))+((2^2)*3)+((2^0)*(3^2)) 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 11:09. |