If space is not a restriction-
Build a B-tree.
1. Have a dummy root.
2. At level one- Numbers divisible by 1. ie. (1-9).
3. At level 2- numbers made after adding a digit to numbers at level 1. e.g.
number 7 at level will have children- (70,72,74,76,78). and so on..
4. Do the same at each level. Le
An algorithm to print all the 10-digit nos such that first 1 digit is
divisible by 1, first 2 digits by 2, first 3 digits by 3 and so
on...first 9 digits by 9. I think the tenth digit can be anything from
0 to 9.
--
You received this message because you are subscribed to the Google Groups
"Algor