• + 0 comments

    May be done in O(n), even for large b, if powering is (assumed to be) done in O(1).