Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

base b expansion of n algorithm

$
0
0
im reading about base b expansion of n algorithm and this book is really hard to read and understand, i am not sure what the bottom part means...

http://tinypic.com/view.php?pic=111m7bn&s=6

what does it return when it says return the list of values produced by this algorithm..how would you do this ? thanks

some method (n,B)/>
if b == 0
    return 1
q = n
k = 0
while q does not == 0
    a[k] = q % b
    q = q / b
    k = k + 1
    return ???

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>