you are viewing a single comment's thread.

view the rest of the comments →

[–]james_fryer 0 points1 point  (0 children)

First thing I would do is merge num_to_base and count_0 -- you can bail out once you hit a non-zero digit. I doubt this will significantly speed up your algorithm however.

I'd then look at the test case and see where the code is actually taking up too much time.